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
Search for URL
Open Workspace
PCRE2 (PHP)
Match
Created 2023-03-10 21:18
0
Regular Expression
/
(
https:
\/\/
|
http:
\/\/
)
.
+
\.
.
+
\/
|
(
http
\:\/\/
|)
localhost
(
\:
(
\d
+
$
)
)
/
gmU
Description
Searches the string for valid URLs. Includes HTTP, HTTPS, and localhost with it's port.
Submitted by
Evan Wilson