It's the global match that does the trick. Even for a zero-width pattern, global matching causes pos to be advanced to the next point in the string where a new match may be tried.
After Compline,
Zaxo
In reply to Re: zero-length match increments pos()
by Zaxo
in thread zero-length match increments pos()
by Errto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |