diff --git a/re_test.go b/re_test.go index eeb038b..bdddb15 100644 --- a/re_test.go +++ b/re_test.go @@ -465,6 +465,19 @@ var reTests = []struct { {`[\t][\n][\v][\r][\f][\b]`, nil, "\t\n\v\r\f\b", []Group{{0, 6}}}, {`.*d`, nil, "abc\nabd", []Group{{4, 7}}}, {`(`, nil, "-", nil}, + {`[\41]`, nil, `!`, []Group{{0, 1}}}, + {`(?]*b`, nil, `a>b`, []Group{}}, + {`^a*$`, nil, `foo`, []Group{}}, + + {`*?`, nil, `-`, nil}, + {`a*?`, nil, `-`, nil}, // non-greedy operators are not supported // Todo - add numeric range tests } @@ -604,7 +617,7 @@ var groupTests = []struct { {`a(?:b|c|d)(.)`, nil, `ace`, []Match{[]Group{{0, 3}, {2, 3}}}}, {`a(?:b|c|d)*(.)`, nil, `ace`, []Match{[]Group{{0, 3}, {2, 3}}}}, {`a(?:b|c|d)+(.)`, nil, `ace`, []Match{[]Group{{0, 3}, {2, 3}}}}, - {`a(?:b|(c|e){1,2}?|d)+?(.)`, nil, `ace`, []Match{[]Group{{0, 3}, {1, 2}, {2, 3}}}}, + {`a(?:b|(c|e){1,2}?|d)+(.)`, nil, `ace`, []Match{[]Group{{0, 3}, {1, 2}, {2, 3}}}}, {`(?