You are mistaken in your assumption that the observed lookahead-behavior would be incorrect. Both the + and the {2,} are as greedy as they are outside of lookaheads, but the lookahead matches repeatedly because it doesn't consume any characters by itself.

Let's play the manual regex engine game:

""."string-N-U-M-B-E-R-O-N-E" MATCH($1="string-N-U-M-B-E-R-O-N-") "%s"."tring-N-U-M-B-E-R-O-N-E" MATCH($1="tring-N-U-M-B-E-R-O-N-") "%s%t"."ring-N-U-M-B-E-R-O-N-E" MATCH($1="ring-N-U-M-B-E-R-O-N-") "%s%t%r"."ing-N-U-M-B-E-R-O-N-E" MATCH($1="ing-N-U-M-B-E-R-O-N-") "%s%t%r%i"."ng-N-U-M-B-E-R-O-N-E" MATCH($1="ng-N-U-M-B-E-R-O-N-") "%s%t%r%i%n"."g-N-U-M-B-E-R-O-N-E" MATCH($1="g-N-U-M-B-E-R-O-N-") "%s%t%r%i%n%g"."-N-U-M-B-E-R-O-N-E" MATCH($1="-N-U-M-B-E-R-O-N-") "%s%t%r%i%n%g%-"."N-U-M-B-E-R-O-N-E" MATCH($1="N-U-M-B-E-R-O-N-") "%s%t%r%i%n%g%-%N"."-U-M-B-E-R-O-N-E" MATCH($1="-U-M-B-E-R-O-N-") ... "%s%t%r%i%n%g%-%N%-%U%-%M%-%B%-%E%-%E%-%R"."-O-N-E" MATCH("-O-N-E") "%s%t%r%i%n%g%-%N%-%U%-%M%-%B%-%E%-%E%-%R%-"."O-N-E" FAIL "%s%t%r%i%n%g%-%N%-%U%-%M%-%B%-%E%-%E%-%R%-O-N-E"."" FAIL

In reply to Re: look-ahead greed changed between perl releases? by amon
in thread look-ahead greed changed between perl releases? by raygun

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":