Re: matching date



joez311@xxxxxxxxx schreef:

Can someone help me out with the following pattern match? I want to
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. Could some one show me the correct way
to pattern match on this?
Thanks,
Zim


I see a comma that probably shouldn't be there, and a missing "]", and
unescaped slashes, which leads to:

m~[01][0-9]/[0-3][0-9]/[0-9][0-9]~



Check out Regexp::Common
http://search.cpan.org/search?module=Regexp::Common

--
Affijn, Ruud

"Gewoon is een tijger."


.



Relevant Pages

  • Re: matching date
    ... match on the date went its formated like mm/dd/yy. ... but my match doesn't seam to work as expected. ... That was the main reason for this advice: ... "Gewoon is een tijger." ...
    (comp.lang.perl.misc)
  • Re: matching date
    ... match on the date went its formated like mm/dd/yy. ... but my match doesn't seam to work as expected. ... unescaped slashes, which leads to: ... one issue with the OP's regex is ...
    (comp.lang.perl.misc)