DB<3> print "aaa" =~ /(a+){1}+a/
aa
DB<4> print "aaa" =~ /(a+){1}a/
aa
DB<5> print $]
5.020002
####
DB<1> print "aaa" =~ /(a+){1}+a/
DB<2> print "aaa" =~ /(a+){1}a/
aa
DB<3> print $]
5.014002
####
lanx@lanx-1005HA:~$ perl -Mre=debug -e' print "aaa" =~ /(a+){1}+a/ '
Compiling REx "(a+){1}+a"
Final program:
1: CURLYX[0] {1,1} (11)
3: OPEN1 (5)
5: PLUS (8)
6: EXACT (0)
8: CLOSE1 (10)
10: WHILEM (0)
11: NOTHING (12)
12: EXACT (14)
14: END (0)
anchored "a" at 0 floating "aa" at 0..2147483647 (checking floating) plus minlen 2
Matching REx "(a+){1}+a" against "aaa"
Intuit: trying to determine minimum start position...
Found floating substr "aa" at offset 0...
Found anchored substr "a" at offset 0...
(multiline anchor test skipped)
Intuit: Successfully guessed: match at offset 0
0 <> | 1:CURLYX[0] {1,1}(11)
0 <> | 10: WHILEM(0)
whilem: matched 0 out of 1..1
0 <> | 3: OPEN1(5)
0 <> | 5: PLUS(8)
EXACT can match 3 times out of 2147483647...
3 <> | 8: CLOSE1(10)
3 <> | 10: WHILEM(0)
whilem: matched 1 out of 1..1
3 <> | 11: NOTHING(12)
3 <> | 12: EXACT (14)
failed...
failed...
2 | 8: CLOSE1(10)
2 | 10: WHILEM(0)
whilem: matched 1 out of 1..1
2 | 11: NOTHING(12)
2 | 12: EXACT (14)
3 <> | 14: END(0)
Match successful!
aaFreeing REx: "(a+){1}+a"
####
lanx@lanx-1005HA:~$ perl -Mre=debug -e' print "aaa" =~ /(a+){1}+a/ '
Compiling REx "(a+){1}+a"
Final program:
1: SUSPEND (16)
3: CURLYX[0] {1,1} (13)
5: OPEN1 (7)
7: PLUS (10)
8: EXACT (0)
10: CLOSE1 (12)
12: WHILEM (0)
13: NOTHING (14)
14: SUCCEED (0)
15: TAIL (16)
16: EXACT (18)
18: END (0)
anchored "a" at 0 floating "aa" at 0..2147483647 (checking floating) minlen 2
Guessing start of match in sv for REx "(a+){1}+a" against "aaa"
Found floating substr "aa" at offset 0...
Found anchored substr "a" at offset 0...
Guessed: match at offset 0
Matching REx "(a+){1}+a" against "aaa"
0 <> | 1:SUSPEND(16)
0 <> | 3: CURLYX[0] {1,1}(13)
0 <> | 12: WHILEM(0)
whilem: matched 0 out of 1..1
0 <> | 5: OPEN1(7)
0 <> | 7: PLUS(10)
EXACT can match 3 times out of 2147483647...
3 <> | 10: CLOSE1(12)
3 <> | 12: WHILEM(0)
whilem: matched 1 out of 1..1
3 <> | 13: NOTHING(14)
3 <> | 14: SUCCEED(0)
subpattern success...
3 <> | 16:EXACT (18)
failed...
1 | 1:SUSPEND(16)
1 | 3: CURLYX[0] {1,1}(13)
1 | 12: WHILEM(0)
whilem: matched 0 out of 1..1
1 | 5: OPEN1(7)
1 | 7: PLUS(10)
EXACT can match 2 times out of 2147483647...
3 <> | 10: CLOSE1(12)
3 <> | 12: WHILEM(0)
whilem: matched 1 out of 1..1
3 <> | 13: NOTHING(14)
3 <> | 14: SUCCEED(0)
subpattern success...
3 <> | 16:EXACT (18)
failed...
2 | 1:SUSPEND(16)
2 | 3: CURLYX[0] {1,1}(13)
2 | 12: WHILEM(0)
whilem: matched 0 out of 1..1
2 | 5: OPEN1(7)
2 | 7: PLUS(10)
EXACT can match 1 times out of 2147483647...
3 <> | 10: CLOSE1(12)
3 <> | 12: WHILEM(0)
whilem: matched 1 out of 1..1
3 <> | 13: NOTHING(14)
3 <> | 14: SUCCEED(0)
subpattern success...
3 <> | 16:EXACT (18)
failed...
Match failed
Freeing REx: "(a+){1}+a"