I wish to set up a user input check for domain names. I found the following on stackoverflow Check for a valid domain name in a string?, and the answer: r'[a-zA-Z\d-]{,63}(.[a-zA-Z\d-]{,63})*' seems to suits my needs (in concept) but when I test it using re.match and a string greater than 63 characters it still returns 'true'.
When I test the result using group() it returns the first 63 characters, which makes sense. Based on that can someone please tell me what I'm doing wrong? Is Match the correct operation to use in this case or is there something else I need to do to so the string is correctly tested?
Thank you.