Re: matching date



joez...@xxxxxxxxx wrote:
match on the date went its formated like mm/dd/yy. I was trying:
/[0,1][0-9]/[0-3][0-9]/[0-9[0-9]/
but my match doesn't seam to work as expected. I think its because of
the / used to split the feilds.

Since you use "/" to delimit your pattern, Perl finds the next "/" and
thinks the pattern specification has ended. You can use another
character to delimit the match, but you must actually put "m" in front
of it, such as using bangs:
m!\d\d/[0-3]\d/\d\d!;

Or you can escape the embedded slashes:

/d\d\/[0-3]\d\/\d\d/;

Or you can use Regexp::Common from CPAN...

BTW, you didn't close your second-to-last character class.

--
David Filmer (http://DavidFilmer.com)

.