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
Get favicon URL from HTML body
Open Workspace
PCRE2 (PHP)
Match
Created 2021-12-10 02:47
0
Regular Expression
/
rel=
[
'"
]
(?:
shortcut
)?
icon
[
'"
]
href=
[
'"
]
(
[^
?'"
]
+
)
[
?'"
]
/
g
Description
Looks for "shortcut icon" or "icon" in a link rel and will strip query strings.
Submitted by
EcoTechie