Perl Monk, Perl Meditation | |
PerlMonks |
Re^10: Understanding a portion of perlretutby choroba (Cardinal) |
on Dec 10, 2015 at 13:02 UTC ( [id://1149891]=note: print w/replies, xml ) | Need Help?? |
In the first case, the engine starts from the left and finds a match, repeating (\w\w\w) 3 times:
The engine than starts to match at B + 1, and finds no such a match. In the second case, the engine starts from the left as well, but finds no match:
So, it moves to A + 1 (still no match), and then A + 2, where it can match with (abc)* repeating zero times:
After matching, it continues (because of /g) to B + 3 (no match), and at B + 4 it finally succeeds with
Better now?
In Section
Seekers of Perl Wisdom
|
|