Then the regex engine tries again starting from point 1, and matches again. Since it matched with zero width twice in a row, the regex engine fears an infinite recursion and artificially bumps the position.
Most patterns don't have side effects, so usually you don't observe this behaviour - but it's the reason why split // works (unless that case is special-cased).
In reply to Re: pos CONFUSION in REGEX
by moritz
in thread pos CONFUSION in REGEX
by suhailck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |