Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Quick Regex questionby AppleFritter (Vicar) |
on Oct 29, 2015 at 22:02 UTC ( [id://1146405]=note: print w/replies, xml ) | Need Help?? |
Howdy, welcome back to the Monastery! Use capturing. Also take advantage of the fact the m// operator returns captures ($1, $2 etc.) in list context, and observe you don't need square brackets around \d:
More on capturing groups can be found in perlre#Capture groups.
In Section
Seekers of Perl Wisdom
|
|