Function regex::is_match
[-]
[+]
[src]
pub fn is_match(regex: &str, text: &str) -> Result<bool, Error>
Tests if the given regular expression matches somewhere in the text given.
If there was a problem compiling the regular expression, an error is returned.
To find submatches, split or replace text, you'll need to compile an expression first.
Note that you should prefer the regex!
macro when possible. For example,
regex!("...").is_match("...")
.