http://qs321.pair.com?node_id=677369


in reply to The first match affect the following of the regex

I have two comments:
  1. Yes you most likely want character classes, but use them in some splits. This screams split, you are taking a string and splitting it into different pieces.
  2. Why aren't you using a module for this? Data::Calc and DateTimeX::Easy are both excellent choices. Using one of them you're guaranteed that either:
    • The module can parse the string - you will get either a date object or and array of the date tokens.
    • If it can't parse it - you get an error.
grep
One dead unjugged rabbit fish later...