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