diff --git a/n3map/rrtypes/nsec.py b/n3map/rrtypes/nsec.py index dd05ee8..f22c851 100644 --- a/n3map/rrtypes/nsec.py +++ b/n3map/rrtypes/nsec.py @@ -25,7 +25,7 @@ def __str__(self): return '\t'.join((super(NSEC, self).__str__(), "NSEC", str(self.next_owner), ' '.join(self.types))) def parser(): - p_nsec = re.compile(r'^NSEC\s+(([a-zA-Z0-9\\_*-]+\.|\.)+)((\s+[A-Z0-9]+)*)\s*$') + p_nsec = re.compile(r'^NSEC\s+((\S+?\.|\.)+)((\s+[A-Z0-9]+)*)\s*$') rr_parse = rr.parser() def nsec_from_text(s): try: diff --git a/n3map/rrtypes/rr.py b/n3map/rrtypes/rr.py index 14a81b4..85e7433 100644 --- a/n3map/rrtypes/rr.py +++ b/n3map/rrtypes/rr.py @@ -16,7 +16,7 @@ def __str__(self): def parser(): """Returns a parser for a general resource record""" - p = re.compile(r'^(([a-zA-Z0-9\\_*-]+\.)+|\.)\s+([0-9]|[1-9][0-9]*)\s+IN\s+(.*)$') + p = re.compile(r'^(([^\s.]+\.)+|\.)\s+([0-9]|[1-9][0-9]*)\s+IN\s+(.*)$') def rr_from_text(s): m = p.match(s) try: