Another alternative if you don't like the map and split.
my $data = 'NCC045-071-109-SCC021-087-091-011545-'; $data =~ s/([A-Z]+)//; my $state = $1; print $state, $1, ' ' while ($data =~ m/(\d+)/g);
In reply to Re: Re: A string parsing question
by Sifmole
in thread A string parsing question
by LordAvatar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |