Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
`
^(?:https?:)?(?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n]+)
`
gm
Input 1
1
New
https://play.google.com/store/apps/details?id=com.skgames.trafficracer%22 http://mplay.google.co.in/sadfask/asdkfals?dk=10 http://lplay.google.co.in/sadfask/asdkfals?dk=10 http://play.google.co.in/sadfask/asdkfals?dk=10 http://tplay.google.co.in/sadfask/asdkfals?dk=10? http://www.google.co.in:/sadfask/asdkfals?dk=10 www.google.co.in/sadfask/asdkfals?dk=10 https://user:pass@google.com/?a=b#asdd //mplay.google.co.in -- Regular expression ^(?:https?:)?(?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\/\n]+) -- used below extracts domain with subdomains out of a full url. -- It skips protocol (ex: https:), "//", "@", www subdomain and -- then captures everything (ex: domain) before ":" or "/" or end of line.
Extraction