Function human_regex::non_unicode_category
source · pub fn non_unicode_category(category: UnicodeCategory) -> HumanRegex
Expand description
A function for not matching Unicode character categories. For matching script categories see non_unicode_script.
use human_regex::{beginning, end, one_or_more, non_unicode_category, UnicodeCategory};
let regex_string = beginning()
+ one_or_more(non_unicode_category(UnicodeCategory::CurrencySymbol))
+ end();
assert!(regex_string.to_regex().is_match("normal words"));
assert!(!regex_string.to_regex().is_match("$¥₹"));