Function human_regex::end

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

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

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