Regular Expressions 101

Library entries

Url regex that capture the domain of the URL

Vote

1

Regular Expression
javascript

/
(?:http|https):\/\/((?:[\w-]+)(?:\.[\w-]+)+)(?:[\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?
/
gm

Description

Loading markdown...
Submitted by anonymous - 6 years ago