Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)
"
igm

Description

From link

Get domain from url start with: http, https, www, or abc:abc.google.com

Submitted by anonymous - 3 years ago