Function human_regex::end_of_text

source ·
pub fn end_of_text() -> HumanRegex
Expand description

A function to match the end of text (even with multi-line mode enabled)

use human_regex::{end_of_text, text};
let regex_string = text("end") + end_of_text();
assert!(regex_string.to_regex().is_match("mend"));
assert!(!regex_string.to_regex().is_match("endocrinologist"));