pub const HH_MM_24H: &str = r"^(0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$";Expand description
Regex for matching a valid 24-hour time format (HH:MM).
Note this regex does not allow omitting the leading zeros.
ยงExample
use regex::Regex;
use valust_regex_utils::time::HH_MM_24H;
let time_regex = Regex::new(HH_MM_24H).unwrap();
assert!(time_regex.is_match("00:00"));
assert!(time_regex.is_match("23:59"));
assert!(!time_regex.is_match("24:00"));
assert!(time_regex.is_match("01:59"));
assert!(!time_regex.is_match("1:60"));