Re: matching date
- From: "Brian McCauley" <nobull67@xxxxxxxxx>
- Date: 28 Sep 2006 14:07:59 -0700
joez311@xxxxxxxxx wrote:
Hi,
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.
Well yes the unescaped / would be a problem if you are also using it as
your pattern demiliter.
As would the missing ]
And I somehow doubut you really want to allow the first character to be
a comma.
Fix all that and your pattern will still match 19/39/06
So why not simply m{\d\d/\d\d/\d\d}?
Fundamentally though you have an insummountable problem trying to match
a date only when it's fomatted mm/dd/yy since there are strings like
"01/02/03" that look like valid dates in yy/mm/dd or dd/mm/yy format
too.
Perhaps if we knew what you really wanted to do...
.
- References:
- matching date
- From: joez311
- matching date
- Prev by Date: Re: Limit FORM mailer submissions to 5 on website, then pause until reviewed by webmaster
- Previous by thread: Re: matching date
- Next by thread: Re: My first socket question
- Index(es):
Relevant Pages
|