Precompiled regex to get domain from the URL. Parameters -------- url: str Original URL from user provided input (URL argument).
(url)
| 472 | |
| 473 | |
| 474 | def PreCompiledRegexDomain(url): |
| 475 | """ |
| 476 | |
| 477 | Precompiled regex to get domain from the URL. |
| 478 | |
| 479 | Parameters |
| 480 | -------- |
| 481 | url: str |
| 482 | Original URL from user provided input (URL argument). |
| 483 | """ |
| 484 | regex = re.compile(r'([a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]\.' + |
| 485 | str(getDomain(str(url))) + ')', re.IGNORECASE) |
| 486 | return regex |
| 487 | |
| 488 | |
| 489 | def PreCompiledRegexIP(): |
no test coverage detected