|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: Array Filter and Lookaheadby moritz (Cardinal) |
| on Nov 20, 2012 at 19:06 UTC ( #1004778=note: print w/ replies, xml ) | Need Help?? |
|
If you really want the last integer in a string, you can find that as /.*(?<!\d)(\d+)/, and get the numbers as
However you seem to want to turn 3.0 into 3 (and not 0), and I don't know the rules behind that. Do you want to permit decimals, and cut off zero-decimals behind the dot? Or something else?
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||