Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^(?:(?P<protocol>.+)://)?(?:(?P<sub>.+)\.)?(?P<domain>.+)\.(?P<tld>[a-zA-Z]+)(?P<path>/(?:(?:.*?)(?:(?=\?)?))?)?(?P<query>\?.+?)?$
"
m

Description

pain

Submitted by anonymous - 3 years ago