This is what I consider to be a minor design bug in Perl regexes. I explain it at Re^5: zero-length match increments pos() (anti-greedy) (though you might find that node easier to understand after reading some of the context from earlier in that thread).
- tye
In reply to Re: [Perl 5.14, regex]: Problems with /g, \G and pos() ("bug")
by tye
in thread [Perl 5.14, regex]: Problems with /g, \G and pos()
by Darkwing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |