diff --git a/ionos_dyndns.py b/ionos_dyndns.py index ddabf3b..1db893c 100644 --- a/ionos_dyndns.py +++ b/ionos_dyndns.py @@ -136,7 +136,7 @@ def main(): def get_domain_from_fqdn(fqdn): # Place the hyphen at the start of the character class to avoid misinterpretation - regex = r"(?:(?:[\w-]+)\.)+([\w-]+\.\w+)$" + regex = r"(?:(?:[\w-]+)\.)?([\w-]+\.\w+)$" match = re.search(regex, fqdn, re.IGNORECASE) return match.group(1) if match else None