|
|
@ -25,6 +25,10 @@ var reTests = []struct {
|
|
|
|
{"b*a*a", "bba", []matchIndex{{0, 3}}},
|
|
|
|
{"b*a*a", "bba", []matchIndex{{0, 3}}},
|
|
|
|
{"(ab)+", "abcabddd", []matchIndex{{0, 2}, {3, 5}}},
|
|
|
|
{"(ab)+", "abcabddd", []matchIndex{{0, 2}, {3, 5}}},
|
|
|
|
{"a(b(c|d)*)*", "abccbd", []matchIndex{{0, 6}}},
|
|
|
|
{"a(b(c|d)*)*", "abccbd", []matchIndex{{0, 6}}},
|
|
|
|
|
|
|
|
{"a(b|c)*d+", "abccdd", []matchIndex{{0, 6}}},
|
|
|
|
|
|
|
|
{"a*", "", []matchIndex{{0, 0}}},
|
|
|
|
|
|
|
|
{"a|b", "c", []matchIndex{}},
|
|
|
|
|
|
|
|
{"(a|b)*c", "aabbc", []matchIndex{{0, 5}}},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestFindAllMatches(t *testing.T) {
|
|
|
|
func TestFindAllMatches(t *testing.T) {
|
|
|
|