Still don't know why I couldn't get it to realize it had hit end of string
It's seen as somewhat of a bug. It happens when the search expression can match a zero length string. In the followig, the parens indicate what the three passes of your earlier s/// matches:
(a@)(b)()
| pass | @- | @+ |
|---|---|---|
| 1 | 0 | 2 |
| 2 | 2 | 3 |
| 3 | 3 | 3 |
The /g loop ends when the fourth pass matches the same thing as the third pass and pos+1 is beyond the end of the string.
In reply to Re^5: Splitting on escapable delimiter
by ikegami
in thread Splitting on escapable delimiter
by Daryn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |