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)
| 1670 | // contains any match of the regular expression pattern. |
| 1671 | // More complicated queries need to use Compile and the full Regexp interface. |
| 1672 | func 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 | } |