in reply to Can't match record

Did it occur to you that the data is invalid? The original regexen were designed to both gather and validate the data. If you just want to gather the data without validating it just replace every \w or \d or with '.' This will match happily at the expense of most of the validation.
my $date = qr/\d\d\.\d\d.\d\d\d\d/; my $fee = qr/\d\d\d\d\d\.\d\d| {8}/; my $digit3 = qr/[\d ]{3}/; my $alpha3 = qr/[\w ]{3}/; my $one = qr/ ^ \d\d (\d{5}) ($digit3) ($date) ($date) ($alpha3) ($alpha3) ($alpha3) (.) (.) ($alpha3) (.) (.) (.) (.) (.) # $ # the first line is an invalid length as well, it has trailin +g spaces /x;

cheers

tachyon

Replies are listed 'Best First'.
Re^2: Can't match record
by Anonymous Monk on Oct 29, 2004 at 05:21 UTC
    tachyon, Didn't detect the trailing spaces, thanks for pointing this out.
Re^2: Can't match record
by Anonymous Monk on Oct 29, 2004 at 06:21 UTC
    Your suggestion works well. Thanks for this and your previous advice. Looking forward to learning more about regular expressions.