Function human_regex::non_digit

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

A function for the non-digit character class (i.e., everything BUT the digits 0-9)

use human_regex::{beginning, end, one_or_more, non_digit};
let regex_string = beginning() + one_or_more(non_digit()) + end();
assert!(regex_string.to_regex().is_match("a string without digits will pass"));
assert!(!regex_string.to_regex().is_match("a string with digits like 99 will fail"));