Function human_regex::beginning
source · pub fn beginning() -> HumanRegex
Expand description
A function to match the beginning of text (or start-of-line with multi-line mode)
use human_regex::{beginning, text};
let regex_string = beginning() + text("hex");
assert!(regex_string.to_regex().is_match("hexagon"));
assert!(!regex_string.to_regex().is_match("chlorhexadine"));