|
25 | 25 | r""" |
26 | 26 | ^ # start of string |
27 | 27 | (?= # lookahead to ensure the following pattern matches |
28 | | - [A-Za-z0-9-]{13,16} # match 13 to 16 alphanumeric characters or hyphens |
29 | | - [:A-Za-z0-9]* # match zero or more colons or alphanumeric characters |
30 | | - [.A-Za-z0-9] # match a dot or alphanumeric character |
| 28 | + [A-Za-z0-9*?\[\]-]{2,16} # match 2-16 alphanumeric chars,-/wildcards |
| 29 | + [:A-Za-z0-9*?[\]]* # match >=0 colons or alphanumeric chars/wildcards |
| 30 | + [.A-Za-z0-9*?[\]] # match a dot or alphanumeric chars or wildcards |
31 | 31 | ) |
32 | 32 | (?!.*--) # negative lookahead to ensure no double hyphens |
33 | 33 | (?!.*:\..) # negative lookahead to ensure no colon followed by a dot |
34 | 34 | ( # start of capture group 1 |
35 | | - (?:[A-Za-z0-9]{2,5}-){3} # match 2 to 5 alphanumeric characters followed |
| 35 | + (?:[A-Za-z0-9*?,\[\]-])* # match >1 alphanumeric characters followed |
36 | 36 | # by a hyphen, repeated 3 times |
37 | | - [\d]* # match zero or more digits |
| 37 | + [\d*] # match zero or more digits |
38 | 38 | [^:]? # match zero or one non-colon character |
39 | 39 | ) |
40 | | - (?::([a-zA-Z0-9:]*))? # match zero or one colon followed by zero or more |
| 40 | + (?::([a-zA-Z0-9*:]*))? # match zero or one colon followed by zero or more |
41 | 41 | # alphanumeric characters or colons (capture group 2) |
42 | | - (?:\.([a-zA-Z0-9]+))? # match zero or one dot followed by one or more |
| 42 | + (?:\.([a-zA-Z0-9*]+))? # match zero or one dot followed by one or more |
43 | 43 | # alphanumeric characters (capture group 3) |
44 | 44 | $ # end of string |
45 | 45 | """, |
46 | | - re.VERBOSE, |
| 46 | + re.VERBOSE | re.UNICODE, |
47 | 47 | ) |
48 | 48 | _LONG_DOM_RE = re.compile(r"^[a-z]{2}\d{2}[a-z]$") |
49 | 49 | _SHORT_DOM_RE = re.compile(r"^[a-z]\d{2}$") |
|
0 commit comments