import re ipv4MatchStr = r'[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' ipv6MatchChars = 'A-Fa-f0-9:.' MATCH2 = '((?