mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-06 10:06:25 +00:00
IP_REGEX - match whole string
This commit is contained in:
parent
c45c291f18
commit
6fba9bf0bf
@ -41,7 +41,7 @@ macro_rules! IPV6RE { () => (concat!(r"(?:",
|
||||
macro_rules! IPRE { () => (concat!(r"(?:", IPV4RE!(), "|", IPV6RE!(), ")")) }
|
||||
|
||||
lazy_static! {
|
||||
pub static ref IP_REGEX: Regex = Regex::new(IPRE!()).unwrap();
|
||||
pub static ref IP_REGEX: Regex = Regex::new(concat!(r"^", IPRE!(), r"$")).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