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
/
\B#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})\b
/
g
Input 1
1
#fff #fefefe #242424 #24ff33 #24ff3o // o is not a valid hex value #ffg // g is not a valid hex value
Substitution
#fff #fefefe #242424 #24ff33 #24ff3o // o is not a valid hex value #ffg // g is not a valid hex value