Regular Expressions 101

Community Library

Community Library Entry

0

Regular ExpressionOpen Workspace

r"
((?#1)((?#2:protocol)\w+)://)((?#3:hostname)[\w\.]+)((?#4:path).+|$)
"
gm

Description
Created·2022-10-01 18:37
Type·Substitution
Flavor·Python

source = "https://regex101.com/r/Y5b7zZ/3"
result = ("https", "regex101.com", "/r/Y5b7zZ/3")
Submitted by saparapat
Open Workspace