- or download this
#!/usr/bin/perl -w
use strict;
...
while ($string=~/((-\d{1,5}){4,20}(-0){4,20})/g) {
print pos($string),"\n";
}
- or download this
#!/usr/bin/perl -w
use strict;
...
for my $match ($string =~/(?<!\d)(?:[^0]\d*-)+(?:0-){3,}0/g) {
print "$match\n";
}
- or download this
NODE EXPLANATION
----------------------------------------------------------------------
...
----------------------------------------------------------------------
) end of grouping
----------------------------------------------------------------------