diff --git a/evaluator/evaluator.go b/evaluator/evaluator.go index 7106587..c4c8e56 100644 --- a/evaluator/evaluator.go +++ b/evaluator/evaluator.go @@ -56,9 +56,13 @@ func parseBang(searchQuery string) (bang string, query string) { endBang := regexEndBang.FindSubmatch([]byte(searchQuery)) if len(endBang) == 3 { - return string(endBang[2]), string(endBang[1]) + bang = strings.ToLower(string(endBang[2])) + query = string(endBang[1]) + return } else if len(startBang) == 3 { - return string(startBang[1]), string(startBang[2]) + bang = strings.ToLower(string(startBang[1])) + query = string(startBang[2]) + return } else { return "", searchQuery }