Or..
Runs, and will handle any number of codes on the same line.my $data = 'NCC045-071-109-SCC021-087-091-011545-'; $data =~ s/([A-Z]+)//; my $state = $1; my @counties = split('-', $data); print join(' ', map { $state.$_; } @counties), "\n";
In reply to Re: A string parsing question
by Sifmole
in thread A string parsing question
by LordAvatar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |