Function pretty_regex::text_beginning
source · pub fn text_beginning() -> PrettyRegex<CharClass<Standard>>
Expand description
Matches the beginning of the text even with multi-line mode on (\A
).
Example
let regex = text_beginning().then(just("foo")).to_regex_or_panic();
assert!(regex.is_match("foo"));
assert!(!regex.is_match("ffoo"));