diff --git a/iptc/ip4tc.py b/iptc/ip4tc.py index 90f5ee7..c4ba58c 100644 --- a/iptc/ip4tc.py +++ b/iptc/ip4tc.py @@ -262,7 +262,7 @@ class iptc(object): class IPTCModule(object): """Superclass for Match and Target.""" pattern = re.compile( - '\s*(!)?\s*--([-\w]+)\s+(!)?\s*"?([^"]*?)"?(?=\s*(?:!?\s*--|$))') + r'\s*(!)?\s*--([-\w]+)\s+(!)?\s*"?([^"]*?)"?(?=\s*(?:!?\s*--|$))') def __init__(self): self._name = None diff --git a/iptc/xtables.py b/iptc/xtables.py index 024779c..1674cc4 100644 --- a/iptc/xtables.py +++ b/iptc/xtables.py @@ -805,7 +805,7 @@ class xtables_target(ct.Union): _xtables_libdir = os.getenv("XTABLES_LIBDIR") if _xtables_libdir is None: import re - ldconfig_path_regex = re.compile('^(/.*):($| \(.*\)$)') + ldconfig_path_regex = re.compile(r'^(/.*):($| \(.*\)$)') import subprocess ldconfig = subprocess.Popen( ('/sbin/ldconfig', '-N', '-v'),