INNER CODE UNIT · Go
retrieveRegexStr
lamoda/gonkey · compare/compare.go:196
func retrieveRegexStr(expr string) string {
if matches := regexExprRx.FindStringSubmatch(expr); matches != nil {
return matches[1]
}
return ""
}
func leafMatchType(expected interface{}) leafsMatchType {
val, ok := expected.(string)
if !ok {
return pure
}
if matches := regexExprRx.FindStringSubmatch(val); matches != nil {
return regex
}