It's a little messy to reuse this, because to do it programatically requires use re 'eval'No, you can (and should) use qr// to avoid this.
local our $count; my $inc_count = qr/(?{$count++})/; /..*..*.$inc_count(?!)/;
Update: local our not my.
In reply to Re^2: Regexes: finding ALL matches (including overlap)
by nobull
in thread Regexes: finding ALL matches (including overlap)
by kaif
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |