@@ -26,34 +26,43 @@ matches = []
2626name = " lookbehind in quantifier non-repeating"
2727regex = " (?:(?<=c)a)+"
2828haystack = " badacacaea"
29- matches = [[5 ,6 ], [7 ,8 ]]
29+ matches = [[5 , 6 ], [7 , 8 ]]
3030
3131[[test ]]
3232name = " lookbehind in quantifier repeating"
3333regex = " (?:(?<=a)a)+"
3434haystack = " babaabaaabaaaac"
35- matches = [[4 ,5 ], [7 ,9 ], [11 ,14 ]]
35+ matches = [[4 , 5 ], [7 , 9 ], [11 , 14 ]]
3636
3737[[test ]]
3838name = " lookbehind with quantifier"
3939regex = " (?<=cb+)a"
4040haystack = " acabacbacbbaea"
41- matches = [[7 ,8 ], [11 ,12 ]]
41+ matches = [[7 , 8 ], [11 , 12 ]]
4242
4343[[test ]]
4444name = " nested lookbehind"
4545regex = " (?<=c[def]+(?<!fed))a"
4646haystack = " cdaceacfeeacfedeacfeda"
47- matches = [[2 ,3 ], [5 ,6 ], [10 ,11 ], [16 ,17 ]]
47+ matches = [[2 , 3 ], [5 , 6 ], [10 , 11 ], [16 , 17 ]]
4848
4949[[test ]]
5050name = " lookbehind with alternation"
5151regex = " (?<=def|abc)a"
5252haystack = " defaabcadefbca"
53- matches = [[3 ,4 ], [7 ,8 ]]
53+ matches = [[3 , 4 ], [7 , 8 ]]
5454
5555[[test ]]
5656name = " lookbehind in alternation"
5757regex = " (?<=c+)a|(?<=d+)a"
5858haystack = " aabacadaccaddaea"
59- matches = [[5 ,6 ], [7 ,8 ], [10 ,11 ], [13 ,14 ]]
59+ matches = [[5 , 6 ], [7 , 8 ], [10 , 11 ], [13 , 14 ]]
60+
61+ [[test ]]
62+ name = " lookbehind next to capture group"
63+ regex = " (?<=c)(a|b)(b|a)"
64+ haystack = " cabacbacb"
65+ matches = [
66+ [[1 , 3 ], [1 , 2 ], [2 , 3 ]],
67+ [[5 , 7 ], [5 , 6 ], [6 , 7 ]],
68+ ]
0 commit comments