in reply to Re^9: Understanding a portion of perlretut
in thread Understanding a portion on the Perlretut
uvXYZdabcXYZfg ^ ^ | | A B
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:
uvXYZdabcXYZfg ^ | A
So, it moves to A + 1 (still no match), and then A + 2, where it can match with (abc)* repeating zero times:
uvXYZdabcXYZfg ^ | A=B
After matching, it continues (because of /g) to B + 3 (no match), and at B + 4 it finally succeeds with
uvXYZdabcXYZfg ^ ^ | | A B
Better now?
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Understanding a portion of perlretut
by Athanasius (Archbishop) on Dec 10, 2015 at 13:27 UTC | |
by Corion (Patriarch) on Dec 10, 2015 at 13:30 UTC |