forked from Proxmox/proxmox
tools: add remaining common regexps
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
1bc52e2482
commit
26e4b205ac
@ -36,4 +36,12 @@ macro_rules! IPRE { () => (concat!(r"(?:", IPV4RE!(), "|", IPV6RE!(), ")")) }
|
||||
|
||||
lazy_static! {
|
||||
pub static ref IP_REGEX: Regex = Regex::new(IPRE!()).unwrap();
|
||||
|
||||
pub static ref SHA256_HEX_REGEX: Regex =
|
||||
Regex::new(r"^[a-f0-9]{64}$")
|
||||
.unwrap();
|
||||
|
||||
pub static ref SYSTEMD_DATETIME_REGEX: Regex =
|
||||
Regex::new(r"^\d{4}-\d{2}-\d{2}( \d{2}:\d{2}(:\d{2})?)?$")
|
||||
.unwrap();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user