pub fn compile(pat: &str) -> Result<Regex, Error>Expand description
Compile a pattern for content / unanchored matching (e.g. ct-search --grep
or any ct-test matcher): the result matches anywhere in the haystack.
ยงExamples
use coding_tools::pattern::compile;
let re = compile("ERROR:").unwrap();
assert!(re.is_match("first line\nERROR: bad input\n"));
assert!(!re.is_match("all good here"));