in reply to Re^2: zero-length match increments pos() (saner)
in thread zero-length match increments pos()

It already found a match at the end of the string. It should not find two different matches at the end of the string.

If I'd used $1 then I would have gotten

x$1cx$1cx$1cx$1

because it was vi, which isn't Perl (because otherwise it would have not been a good choice for demonstrating how it doesn't act like Perl).

- tye