use re 'eval'; $_ = q'abczdefzabcghijklzabczaerabrtyuabcethdauthabkudiabc'; if (/([a-z]{3}).+?\1/) { $unit = $1; m< ( (?{ push @found, pos() }) $unit ) \G .+? \1 >gx; print join ', ', @found, "\n"; }
-Mark
In reply to Re: Finding a repeating substring with a regex
by kvale
in thread Finding a repeating substring with a regex
by chargrill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |