func (mre *MatchRegexp) Match(input string, repl *caddy.Replacer) bool {
	matches := mre.compiled.FindStringSubmatch(input)
	if matches == nil {
		return false
	}

	// save all capture groups, first by index
	for i, match := range matches {
		key := mre.phPrefix + "." + strconv.Itoa(i)
		repl.Set(key, match)
	}

	// then by name
	for i, name := range mre.compiled.SubexpNames() {
		if i != 0 && name != "" {
			key := mre.phPrefix + "." + name
			repl.Set(key, matches[i])
		}
	}

	return true
}
// Match returns true if input matches the compiled regular
// expression in mre. It sets values on the replacer repl
// associated with capture groups, using the given scope
// (namespace).
Match returns true if input matches the compiled regular
expression in mre. It sets values on the replacer repl
associated with capture groups, using the given scope
(namespace).
// Match returns true if input matches the compiled regular // expression in mre . It sets values on the replacer repl // associated with capture groups using the given scope // ( namespace ) .
func (mre *MatchRegexp) Match(input string, repl *caddy.Replacer) bool {
	matches := mre.compiled.FindStringSubmatch(input)
	if matches == nil {
		return false
	}
	for i, match := range matches {
		key := mre.phPrefix + "." + strconv.Itoa(i)
		repl.Set(key, match)
	}
	for i, name := range mre.compiled.SubexpNames() {
		if i != 0 && name != "" {
			key := mre.phPrefix + "." + name
			repl.Set(key, matches[i])
		}
	}
	return true
}
func ( mre * MatchRegexp ) Match ( input string , repl * caddy . Replacer ) bool { matches := mre . compiled . FindStringSubmatch ( input ) if matches == nil { return false } for i , match := range matches { key := mre . phPrefix + " " + strconv . Itoa ( i ) repl . Set ( key , match ) } for i , name := range mre . compiled . SubexpNames ( ) { if i != 0 && name != " " { key := mre . phPrefix + " " + name repl . Set ( key , matches [ i ] ) } } return true }
Match returns true if input matches the compiled regular
expression in mre.
Match returns true if input matches the compiled regular expression in mre .
// save all capture groups, first by index // then by name