Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions util/builtin_operators.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,7 @@ func KeyMatch5Func(args ...interface{}) (interface{}, error) {

// RegexMatch determines whether key1 matches the pattern of key2 in regular expression.
func RegexMatch(key1 string, key2 string) bool {
res, err := regexp.MatchString(key2, key1)
if err != nil {
panic(err)
}
return res
return mustCompileOrGet(key2).MatchString(key1)
}

// RegexMatchFunc is the wrapper for RegexMatch.
Expand Down