Where $1 is the number, $2 the rest.my $str = '012346.jpg 012346-all.jpg 012346-EXP.jpg'; while ($str =~ /(\d+)(.*?\.jpg)/gi) { print "$1$2\n"; }
In reply to Re: regex help
by TedPride
in thread regex help
by calypso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |