Regular Expressions 101

Community Patterns

get domain from url

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 - 2 years ago