Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(((https|http):\/\/)?([a-z0-9@:%._\+~#=]{1,256}\.)+[a-z0-9:()]{1,20}+(\/[a-z0-9_():@.]+)*(\/)?((\?|#).*)?|(website_not_available))
/
gm
Input 1
New
http://foo.com/blah_blah http://foo.com/blah_blah/ http://foo.com/blah_blah_(wikipedia) http://foo.com/blah_blah_(wikipedia)_(again) http://www.example.com/wpstyle/?p=364 https://www.example.com/foo/?bar=baz&inga=42&quux http://✪df.ws/123 www.https//:fgdv.com test.https://www.xflowpay.com http://fr.wikipedia.org/wiki/%C3%89l%C3%A9phant www.exldfcsdf/dcsdfv http://userid:password@example.com:8080 http://userid:password@example.com:8080/ http://userid@example.com http://userid@example.com/ http://userid@example.com:8080 http://userid@example.com:8080/ http://userid:password@example.com http://userid:password@example.com/ http://142.42.1.1/ http://142.42.1.1:8080/ http://➡.ws/䨹 http://www.mysite.com/myresumé.html http://foo.com/blah_(wikipedia)#cite-1 http://foo.com/blah_(wikipedia)_blah#cite-1 http://code.google.com/events/#&product=browser http://foo.com/unicode_(✪)_in_parens http://foo.com/(something)?after=parens http://code.google.com/events/#&product=browser ftp://foo.bar/baz http:
Extraction
http://foo.com/blah_blah http://foo.com/blah_blah/ http://foo.com/blah_blah_(wikipedia) http://foo.com/blah_blah_(wikipedia)_(again) http://www.example.com/wpstyle/?p=364 https://www.example.com/foo/?bar=baz&inga=42&quux http://✪df.ws/123 www.https//:fgdv.com test.https://www.xflowpay.com http://fr.wikipedia.org/wiki/%C3%89l%C3%A9phant www.exldfcsdf/dcsdfv http://userid:password@example.com:8080 http://userid:password@example.com:8080/ http://userid@example.com http://userid@example.com/ http://userid@example.com:8080 http://userid@example.com:8080/ http://userid:password@example.com http://userid:password@example.com/ http://142.42.1.1/ http://142.42.1.1:8080/ http://➡.ws/䨹 http://www.mysite.com/myresumé.html http://foo.com/blah_(wikipedia)#cite-1 http://foo.com/blah_(wikipedia)_blah#cite-1 http://code.google.com/events/#&product=browser http://foo.com/unicode_(✪)_in_parens http://foo.com/(something)?after=parens http://code.google.com/events/#&product=browser ftp://foo.bar/baz http: