code: func matchExactRegex(v string) ([]string, bool) {
  	re, err := syntax.Parse(v, syntax.Perl)
  	if err != nil {
  		// Nothing we can do or log.
  		return nil, false
  	}
  	re = re.Simplify()
  
  	if re.Op != syntax.OpConcat {
  		return nil, false
  	}
  
  	if len(re.Sub) < 2 {
  		// Regex has too few subexpressions.
  		return nil, false
  	}
  
  	start := re.Sub[0]
  	if !(start.Op == syntax.OpBeginLine || start.Op == syntax.OpBeginText) {
  		// Regex does not begin with ^
  		return nil, false
  	}
  
  	end := re.Sub[len(re.Sub)-1]
  	if !(end.Op == syntax.OpEndLine || end.Op == syntax.OpEndText) {
  		// Regex does not end with $
  		return nil, false
  	}
  
  	// Remove the begin and end text from the regex.
  	re.Sub = re.Sub[1 : len(re.Sub)-1]
  
  	if len(re.Sub) == 0 {
  		// The regex /^$/
  		return nil, true
  	}
  	return matchRegex(re)
  }
docs: // matchExactRegex matches regexes into literals if possible. This will match the
  // pattern /^foo$/ or /^(foo|bar)$/. It considers /^$/ to be a matching regex.