in reply to Match all Non-0 and Letters
Hello arblargan, and welcome to the Monastery!
Assuming your “words” are separated by whitespace within each line, the following should do what you want:
use strict; use warnings; OUTER: while (my $line = <DATA>) { my @words = split /\s+/, $line; for (@words) { next OUTER unless /^0{7}\d$/; } print $line; } __DATA__ 00000000 00000001 00000009 00000006 FFFFFFFF 00000007 6C163512 00000000 00000008 00000003 00000004 01020102
Output:
17:21 >perl 1786_SoPW.pl 00000000 00000001 00000009 17:22 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|