Steve,
There are several other questions that need to be asked before you can
decide on a regular expression:
* Is there a possiblity of typos in the month names?
* Can the month names sometimes be in all uppercase?
* Can there be more than one space between month and day or comma and year?
Ca
MAIL PROTECTED]
> Subject: RE: Regular Expression, matching dates
>
>
> if we have the date like "ber 11, 2001" or "ugust 12, 2001"
> then the match is
> ture whcih is not what we want.
>
>
> --- Peter Eisengrein <[EMAIL PROTECTED]>
if we have the date like "ber 11, 2001" or "ugust 12, 2001" then the match is
ture whcih is not what we want.
--- Peter Eisengrein <[EMAIL PROTECTED]> wrote:
> untested...
>
> /[January|February|March|April|May|June|July|August|September|October|Novemb
> er|December]\s{0,}\d{1,2}\,\s{0,}\d{4}/
:
: I need a regular expression that will match dates in the
: following format.
:
: January 01, 2001
: January 15, 2001
: February 01, 2001
:
: so on. All dates are spelled out March, April, May...
:
if ($date_string =~ /(\w+)\s+(\d{1,2}),\s+(\d{4})/) {
$month = $1;
untested...
/[January|February|March|April|May|June|July|August|September|October|Novemb
er|December]\s{0,}\d{1,2}\,\s{0,}\d{4}/
> -Original Message-
> From: steve silvers [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 18, 2001 3:00 PM
> To: [EMAIL PROTECTED]
> Subject: Regular Expressi