Fix regexp for IPv6

This commit is contained in:
Antonio J. Delgado 2024-12-09 13:45:54 +02:00
parent afe07f9d00
commit 10421cc86a

View file

@ -194,7 +194,7 @@ same target, doing nothing."""
result.content
)
match = re.match(
br'[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}',
br'[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}:?:[0-9a-f]{0,4}',
result.content)
if match:
ipv6 = match.group(0).decode()