+----------------------------------- any number of any characters | before toss-tag field | | +---------------------------- toss-tag field (defined | | string, constant width) | | | | +--------------------- any number of any non-digits | | | between end of toss-tag | | | and start of number field. | | | characters can vary after | | | first field seen, but width | | | cannot vary once set. | | | | | | +----------- number field. number cannot | | | | vary once set. | | | | | | | | +---- any number of any characters | | | | | after number field | | | | | /---+----\/+\/----+----\/---+---\/-+-----------------------\ 'line 2 xx Foo NineChars 1234-12.3 other 123 first valid keep' #### c:\@Work\Perl\monks>perl -wMstrict -e "use Data::Dump qw(dd); ;; my @lines = ( 'line 1 this line has no Foo number: keep', 'line 2 xx Foo NineChars 1234-12.3 other 123 first valid keep', 'KILL 3 x Foo kill-this 1234-12.3 line 123 DELETE', 'line 4 Foo -retain- 1234-12.3 offset 123 line keep', 'KILL 5 Foo ninechars 1234-12.3 line 123 DELETE', 'line 6 Foo --retain-- 1234-12.3 offset 123 line keep', 'line 7 Foox not tag 1234-12.3 same offset 123 keep', 'line 8 has no Foo number: keep', 'KILL 9 xxx Foo toss-this 1234-12.3 other 123 DELETE', 'line 10 Foo -retain- 1234-12.3 this line keep', 'line 11 Foo ninechars 1234-21.3 same offset, different sn: keep', 'KILL 12 x Foo nInEcHaRs 1234-12.3 one DELETE', 'line 13 no Foo number: keep', ); dd \@lines; print qq{\n}; ;; my $strange_n = qr{ (?