|
|
|
@ -144,6 +144,10 @@ var reTests = []struct {
|
|
|
|
|
{"(?!hello)", "hello world", []MatchIndex{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}, {6, 6}, {7, 7}, {8, 8}, {9, 9}, {10, 10}, {11, 11}}},
|
|
|
|
|
{"(?<=hello)", "hello world", []MatchIndex{{5, 5}}},
|
|
|
|
|
{"(?<!hello)", "hello world", []MatchIndex{{0, 0}, {1, 1}, {2, 2}, {3, 3}, {4, 4}, {6, 6}, {7, 7}, {8, 8}, {9, 9}, {10, 10}, {11, 11}}},
|
|
|
|
|
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "40", []MatchIndex{{0, 2}}},
|
|
|
|
|
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "040", []MatchIndex{}},
|
|
|
|
|
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "400", []MatchIndex{{0, 3}}},
|
|
|
|
|
{"^((3[7-9])|([4-9][0-9])|([1-9][0-9][0-9])|(1000))$", "4000", []MatchIndex{}},
|
|
|
|
|
|
|
|
|
|
// Todo - add lookaround tests
|
|
|
|
|
{"(?<=f)f+(?=f)", "fffff", []MatchIndex{{1, 4}}},
|
|
|
|
|