Regular Expressions 101

Community Library

Community Library Entry

2

Regular ExpressionOpen Workspace

r"
^((?P<scheme>[^:/?#]+):(?=//))?(//)?(((?P<login>[^:]+)(?::(?P<password>[^@]+)?)?@)?(?P<host>[^@/?#:]*)(?::(?P<port>\d+)?)?)?(?P<path>[^?#]*)(\?(?P<query>[^#]*))?(#(?P<fragment>.*))?
"
gm

Description
Created·2022-02-02 23:27
Type·Match
Flavor·Python

Extract parts of a URL on Python

Submitted by dixanms
Open Workspace