pub fn unicode_script(category: UnicodeScript) -> HumanRegex
Expand description

A function for matching Unicode characters belonging to a certain script category. For matching other categories see unicode_category.

use human_regex::{beginning, end, one_or_more, unicode_script, UnicodeScript};
let regex_string = beginning()
    + one_or_more(unicode_script(UnicodeScript::Han))
    + end();
assert!(regex_string.to_regex().is_match("蟹"));
assert!(!regex_string.to_regex().is_match("latin text"));