Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: regex for multiple capture within boundaryby ikegami (Patriarch) |
on Jul 17, 2006 at 01:28 UTC ( [id://561627]=note: print w/replies, xml ) | Need Help?? |
That's exactly it (although there could be 0 elements if the match fails). my @nums = ($x =~ /\s(\S+)/)[0] =~ /(\d+)/g;
If you're going to use /g, drop the \s:
or use split:
In Section
Seekers of Perl Wisdom
|
|