http://www.perlmonks.org?node_id=806123


in reply to Recursive substitution

if it can be done entirely inside the regex itself;

If what can be done? Change the position at which it will continue matching? Why don't you try it?

>perl -le"$_='abc'; /(.)(?{ pos = 0 })(.)/; print for $1,$2" a b

Guess not.