code: func SliceMatchesRegex(input string, expressions []string) (bool, error) {
  	for _, expression := range expressions {
  		if !strings.HasPrefix(expression, "^") || !strings.HasSuffix(expression, "$") {
  			// replace glob-style wildcards with regexp wildcards
  			// for plain strings, and quote all characters that could
  			// be interpreted in regular expression
  			expression = "^" + GlobToRegexp(expression) + "$"
  		}
  
  		expr, err := regexp.Compile(expression)
  		if err != nil {
  			return false, trace.BadParameter(err.Error())
  		}
  
  		// Since the expression is always surrounded by ^ and $ this is an exact
  		// match for either a a plain string (for example ^hello$) or for a regexp
  		// (for example ^hel*o$).
  		if expr.MatchString(input) {
  			return true, nil
  		}
  	}
  
  	return false, nil
  }
docs: // SliceMatchesRegex checks if input matches any of the expressions. The
  // match is always evaluated as a regex either an exact match or regexp.