in reply to A string parsing question
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: A string parsing question
by suaveant (Parson) on Apr 20, 2001 at 19:29 UTC | |
by Sifmole (Chaplain) on Apr 20, 2001 at 19:36 UTC | |
|
Re: Re: A string parsing question
by Sifmole (Chaplain) on Apr 20, 2001 at 19:29 UTC |