alexiskb has asked for the wisdom of the Perl Monks concerning the following question:
how do i loop through an array of these values, as making it work with the ( | ) is ugly also..thank you...sub format { $long =~s/( & CO )[^,]+/ AND CO/; $long =~s/&/AND/g; $long =~s/( EUR1)[^,]+//; $long =~s/( EUR2)[^,]+//; $long =~s/( EUR3)[^,]+//; $long =~s/( EUR4)[^,]+//; $long =~s/( EUR8)[^,]+//; $long =~s/( EUR0\.)[^,]+//; $long =~s/( CHF10)[^,]+//; $long =~s/( Y5)[^,]+//; $long =~s/( NV )[^,]+//; $long =~s/(NON-CUM)[^,]+//; $long =~s/( LTD)[^,]+//; $long =~s/( FIN )[^,]+//; $long =~s/( INTL)[^,]+//; $long =~s/( FIN )[^,]+//; $long =~s/(\$)[^,]+//; $long =~s/\s+$//g; ...etc... for another 40 lines! }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple Regex, it works but it aint clever
by Abigail-II (Bishop) on Aug 06, 2002 at 11:30 UTC | |
|
Re: Multiple Regex, it works but it aint clever
by Basilides (Friar) on Aug 06, 2002 at 12:41 UTC | |
by {NULE} (Hermit) on Aug 06, 2002 at 12:51 UTC | |
by alexiskb (Acolyte) on Aug 06, 2002 at 13:37 UTC | |
|
Re: Multiple Regex, it works but it aint clever
by {NULE} (Hermit) on Aug 06, 2002 at 12:47 UTC | |
|
Re: Multiple Regex, it works but it aint clever
by RMGir (Prior) on Aug 06, 2002 at 13:44 UTC | |
|
Re: Multiple Regex, it works but it aint clever
by fruiture (Curate) on Aug 06, 2002 at 14:18 UTC |