pe_test.go | 5 +++++ validators.go | 2 +- diff --git a/pe_test.go b/pe_test.go index 28f87f7afb3ddfb231e751b018861b1234057654..eefbbfe79a922799fb42f9528d9e6cbafb54b1f3 100644 --- a/pe_test.go +++ b/pe_test.go @@ -13,6 +13,11 @@ if len(output) != 0 { t.Errorf("Matches sentence", output) } + output = GetAllMatches("/var//log", MatchOptions{}) + if len(output) != 0 { + t.Errorf("Matches double //", output) + } + output = GetAllMatches("s/+//", MatchOptions{}) if len(output) != 0 { t.Errorf("Doesn't match substitute", output) diff --git a/validators.go b/validators.go index adc811666613f33c9c5c9aae31f6a390f2d66170..042862c2c77c131db800d58a96e7152d50758931 100644 --- a/validators.go +++ b/validators.go @@ -67,7 +67,7 @@ return false } func containsInvalidString(input string) bool { - invalidStrings := []string{"()", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."} + invalidStrings := []string{"//", "()", "and/or", "origin/", "{", "}", "<", ">", "$", "*", "this."} for _, s := range invalidStrings { if strings.Contains(input, s) { return true