No, it can't give an infinite loop, exactly because of the empty match rule.
As I noted in the very last paragraph in the post, resetting pos is not making this worse because we don't recall the main regexen from @toktab after we reset pos.
In reply to Re^2: The story of a strange line of code: pos($_) = pos($_);
by ambrus
in thread The story of a strange line of code: pos($_) = pos($_);
by ambrus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |