Function human_regex::within

source ·
pub fn within(range: RangeInclusive<char>) -> HumanRegex
Expand description

Matches anything within a range of characters

 use human_regex::{beginning, end, within};
 let regex_string = beginning() + within('a'..='d') + end();
 println!("{}", beginning());
 assert!(regex_string.to_regex().is_match("c"));
 assert!(!regex_string.to_regex().is_match("h"));