Regexp::Common::time would seem to be made to measure for this task:
#!/usr/bin/perl -w use strict; use Regexp::Common qw(time); while (<DATA>) { print if ($_ =~ $RE{time}{strftime}{-pat => '%B %d %Y'}); } __DATA__ December 15 2005 some line Flat File Release 100.0 someline
Which prints:
December 15 2005
Cheers,
Darren :)
In reply to Re: Regexp for extracting date
by McDarren
in thread Regexp for extracting date
by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |