Re: matching date
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 08:42:49 -0500
joez311@xxxxxxxxx <joez311@xxxxxxxxx> wrote:
I want to
match on the date went its formated like mm/dd/yy.
print "$_ looks like a date\n" if m#^\d\d/\d\d/\d\d$#; # untested
I was trying:^^^^^ ^^ where is the closing square bracket?
/[0,1][0-9]/[0-3][0-9]/[0-9[0-9]/
^^^^^ matches any one of *three* characters, it will match a comma...
but my match doesn't seam to work as expected. I think its because of
the / used to split the feilds.
Either put a backslash in front of the slashes, or use an alternate
delimiter for the match operator.
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.
- References:
- matching date
- From: joez311
- matching date
- Prev by Date: Re: Need help with pattern matching/substitution.
- Next by Date: Re: Questions about Inline::C
- Previous by thread: Re: matching date
- Next by thread: Re: matching date
- Index(es):
Relevant Pages
|