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