Regex lookahead example not as stated in Camel 4th

Yitzchak Scott-Thoennes sthoenna at
Wed Jun 19 16:00:02 BST 2013

On Wed, Jun 19, 2013 at 7:28 AM, Bob MacCallum <uncoolbob at> wrote:
> so, forgetting the typo for a moment, why doesn't it output
> 012
> 012
> 012
> 012
> ...
> ?
> From my reading of the 5.12 perlre docs, there is no mention of moving the
> cursor along by one position after each match.
> Maybe that is a more general thing I wasn't aware of.

It's not as simple as moving by one after each match; when it goes to
match it won't allow a 0-length match at the same position as the
previous 0-length match.

More information about the mailing list