Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

0

Regular Expression
Python

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

Description

For extracting the base URL and domain from a URL String

Submitted by QuickRegEx - 4 years ago