Lines Matching refs:regex
3 // It's too annoying to carefully define macros based on which regex engines
17 pub use regex::{Regex, RegexSet};
19 pub use regex::bytes::{Regex, RegexSet};
33 // Usage: regex!(pattern)
40 macro_rules! regex {
60 // regex accepts in its `is_match` and `find_iter` methods.
91 // a particular haystack. If the regex doesn't match, then the benchmark fails.
101 bench_is_match!($name, true, regex!($pattern), $haystack);
108 // a particular haystack. If the regex matches, then the benchmark fails.
118 bench_is_match!($name, false, regex!($pattern), $haystack);
122 // USAGE: bench_is_match!(name, is_match, regex, haystack)
125 // a particular haystack. If the regex match status doesn't match is_match,
130 // is_match reports whether the regex is expected to match the haystack or not.
132 // regex should be a ::Regex.
143 // compile a regex outside of the b.iter() call and be done with
188 static ref RE: Mutex<Regex> = Mutex::new(regex!($pattern));
235 // USAGE: bench_is_match_set!(name, is_match, regex, haystack)
263 // USAGE: bench_matches_set!(name, is_match, regex, haystack)