Maybe you're really after m/\G.../gc ? start the next match on the same string where the last match left off?
see Re^2: Help with regular expression, perlfaq6#What good is \G in a regular expression?
In reply to Re: Find Prefix if regex didn't match
by Anonymous Monk
in thread Find Prefix if regex didn't match
by demoralizer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |