|
|
@ -324,6 +324,8 @@ var groupTests = []struct {
|
|
|
|
{`(ab|cd)e`, nil, `abcde`, []Match{[]Group{{2, 5}, {2, 4}}}},
|
|
|
|
{`(ab|cd)e`, nil, `abcde`, []Match{[]Group{{2, 5}, {2, 4}}}},
|
|
|
|
{`^(ab|cd)e`, nil, `abcde`, []Match{}},
|
|
|
|
{`^(ab|cd)e`, nil, `abcde`, []Match{}},
|
|
|
|
{`(abc|)ef`, nil, `abcdef`, []Match{[]Group{{4, 6}, {4, 4}}}},
|
|
|
|
{`(abc|)ef`, nil, `abcdef`, []Match{[]Group{{4, 6}, {4, 4}}}},
|
|
|
|
|
|
|
|
{`(a|b)c*d`, nil, `abcd`, []Match{[]Group{{1, 4}, {1, 2}}}},
|
|
|
|
|
|
|
|
{`(ab|ab*)bc`, nil, `abc`, []Match{[]Group{{0, 3}, {0, 1}}}},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func TestFindAllMatches(t *testing.T) {
|
|
|
|
func TestFindAllMatches(t *testing.T) {
|
|
|
|