my @matches = "-$str-" =~ /(?:-[^0-]+)*(?:-0){4,}(?=-)/g;
Useful test cases:
Note: My code doesn't find overlapping matches. It's not an issue with the pattern you describe, but it might be for other patterns.
In reply to Re: Perl pattern finding
by ikegami
in thread Perl pattern finding
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |