code: func matchRegexp(rx interface{}, str interface{}) bool {
  
  	var r *regexp.Regexp
  	if rr, ok := rx.(*regexp.Regexp); ok {
  		r = rr
  	} else {
  		r = regexp.MustCompile(fmt.Sprint(rx))
  	}
  
  	return (r.FindStringIndex(fmt.Sprint(str)) != nil)
  
  }
docs: // matchRegexp return true if a specified regexp matches a string.