Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Match any url in text or html (http, https)
Open Workspace
PCRE2 (PHP)
Match
Created 2022-02-02 15:04
4
Regular Expression
/
(?:
http
[
s
]
?
:
\/\/
.
)?(?:
www
\.
)?
[
-a
-
zA
-
Z0
-
9@%._
\+
~#=
]
{2,256}
\.
[
a
-
z
]
{2,6}
\b
(?:
[
-a
-
zA
-
Z0
-
9@:%_
\+
.~#?&
\/\/
=
]
*
)
/
gm
Description
Match any url in text or html (http, https)
Submitted by
Jérémy Munsch