in reply to Regex question
What I want is just the date information "1st day of November 2005"No, you don't, you also want the date string to be prepended by "as of" etc but then you don't care. (?:shrug)*.
If you just wanted the date string, why not just:
$_ = "Accepted and agreed to by Jerry Smith as of the 1st day of November 2005."; print $1 if /(\d+(?:st|nd|rd|th)\s+day\s+of\s+[ADFJMNOSabceghilmnoprst +uvy]+\s+\d+)/ms; __END__ 1st day of November 2005
which would also match "35th day of ANNO 0007", but the matched date strings need to be validated anyways...
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|