diff --git a/re_test.go b/re_test.go index 44c16a9..9b20179 100644 --- a/re_test.go +++ b/re_test.go @@ -56,6 +56,13 @@ var reTests = []struct { {"[Ff]r[Uu|]it", "Fr|it", []matchIndex{{0, 5}}}, {"[Ff]r([Uu]|[pP])it", "Frpit", []matchIndex{{0, 5}}}, {"[Ff]r[Uu]|[pP]it", "Frpit", []matchIndex{{2, 5}}}, + {"[a-zA-Z]+", "Hello, how is it going?", []matchIndex{{0, 5}, {7, 10}, {11, 13}, {14, 16}, {17, 22}}}, + + {".+", "Hello, how is it going?", []matchIndex{{0, 23}}}, + {"a.", "a ", []matchIndex{{0, 2}}}, + {"a.b", "a/b", []matchIndex{{0, 3}}}, + {".", "a ", []matchIndex{{0, 2}}}, + {"a.", "a ", []matchIndex{{0, 2}}}, } func TestFindAllMatches(t *testing.T) {