From e13f6f5301eaa827aed910b4608306fef4c97bb0 Mon Sep 17 00:00:00 2001 From: kiblik Date: Tue, 30 Apr 2024 21:54:03 +0200 Subject: [PATCH] Fix regex for Mac --- yamale/validators/validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yamale/validators/validators.py b/yamale/validators/validators.py index 03259d9..20fbb7a 100644 --- a/yamale/validators/validators.py +++ b/yamale/validators/validators.py @@ -243,8 +243,8 @@ class Mac(Regex): def __init__(self, *args, **kwargs): super(Mac, self).__init__(*args, **kwargs) self.regexes = [ - re.compile(r"[0-9a-fA-F]{2}([-:]?)[0-9a-fA-F]{2}(\\1[0-9a-fA-F]{2}){4}$"), - re.compile(r"[0-9a-fA-F]{4}([-:]?)[0-9a-fA-F]{4}(\\1[0-9a-fA-F]{4})$"), + re.compile(r"[0-9a-fA-F]{2}([-:]?)[0-9a-fA-F]{2}(\1[0-9a-fA-F]{2}){4}$"), + re.compile(r"[0-9a-fA-F]{4}([-:]?)[0-9a-fA-F]{4}(\1[0-9a-fA-F]{4})$"), ]