in reply to Re: Array Filter and Lookahead
in thread Array Filter and Lookahead
>perl -wMstrict -le "my @lines = ('xx', '0 xx', '1 xx 3.2'); ;; 'Zonk' =~ m{ (\w+) }xms; ;; my @filtered = map { /.*(?<!\d)(\d+)/; $1 // '' } @lines; printf qq{'$_' } for @filtered; " 'Zonk' '0' '2'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Array Filter and Lookahead
by moritz (Cardinal) on Nov 21, 2012 at 06:38 UTC |
In Section
Seekers of Perl Wisdom