Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: regular expression for "time-of-day" is not working

by DrHyde (Prior)
on Apr 05, 2012 at 09:58 UTC ( #963635=note: print w/ replies, xml ) Need Help??


in reply to regular expression for "time-of-day" is not working

It's got other problems too. It won't match "09:02" or "23:02" or "00:02". You probably want something like this ...

/\b ( ( ([01][0-9]|2[0123]):[0-5][0-9] ) |( (1[012]|[1-9] ):[0-5][0-9]\s+[ap]m ) ) \b/ix


Comment on Re: regular expression for "time-of-day" is not working
Download Code
Re^2: regular expression for "time-of-day" is not working
by vjvalor (Initiate) on Apr 05, 2012 at 12:02 UTC
    Thanks you DrHyde. I was interested in 12-hour time format with no preceding 0.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://963635]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-08-22 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (158 votes), past polls