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
Comment on
Re: Help with a more precise regex
Download
Code
In Section
Seekers of Perl Wisdom