Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-05-12 15:32
Flavor·Python

r"
(?P<url>(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?(?P<domain>[^:\/?\n]+))/*.*
"
g
Open regex in editor

Description

For extracting the base URL and domain from a URL String

Submitted by QuickRegEx