MCPcopy Create free account
hub / github.com/coregx/coregex / MatchReader

Function MatchReader

regex.go:1672–1678  ·  view source on GitHub ↗

MatchReader reports whether the text returned by the RuneReader contains any match of the regular expression pattern. More complicated queries need to use Compile and the full Regexp interface.

(pattern string, r io.RuneReader)

Source from the content-addressed store, hash-verified

1670// contains any match of the regular expression pattern.
1671// More complicated queries need to use Compile and the full Regexp interface.
1672func MatchReader(pattern string, r io.RuneReader) (matched bool, err error) {
1673 re, err := Compile(pattern)
1674 if err != nil {
1675 return false, err
1676 }
1677 return re.MatchReader(r), nil
1678}

Callers 1

Calls 2

MatchReaderMethod · 0.80
CompileFunction · 0.70

Tested by 1