Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Help with a more precise regex

by perlplexer (Hermit)
on Apr 25, 2003 at 19:55 UTC ( [id://253232]=note: print w/replies, xml ) Need Help??


in reply to Help with a more precise regex

How about this: /^(\d+)([dh])(?:\s+(\d+)h)?/
$1 - number, $2 defines whether it's 'd' or 'h'
$3 - number for 'h' (if defined)

--perlplexer

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-25 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found