in reply to Regex Question for parsing a string
Is this what you’re looking for?
#! perl use strict; use warnings; my @strings = ('ECX3', 'ABC3X 98', 'A B3X 28.5'); for (@strings) { print "$1\n" if /([a-zA-Z]{1,2})/; }
Output:
13:13 >perl 633_SoPW.pl EC AB A 13:13 >
If your requirements are more complex, please explain exactly what is needed.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|