works for the dataset provided, and i think for seavers extension.my @records = (<DATA>); # lookbehind to make sure those that start # with an apostrophe end with one... $tok1 = qr/[\'][A-Za-z0-9\s\']+(?<=\')/; $tok2 = qr/[A-Z\?0-9]+; # for each record in the above sample... # note precedence in regex below... foreach my $record (@records){ my @fields = ($record =~ /$tok1|$tok2/g); # do something with fields } __DATA__ #...those irritating records in full...
In reply to Re: can't use unpack or split??
by wufnik
in thread can't use unpack or split??
by seaver
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |