go ahead... be a heretic | |
PerlMonks |
Re: Help with a more precise regexby perlplexer (Hermit) |
on Apr 25, 2003 at 19:55 UTC ( [id://253232]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|