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)?( .*)?? e
/
g
Input 1
-- MATCHES. backrefs should be " b" and " c d" -- a b c d e -- MATCHES. backrefs should be "" and whatever -- a c c d e -- MATCHES. backrefs should be " b" and "" -- b e -- MATCHES. backrefs should be " b" and " c" -- b c e -- MATCHES. backrefs should be "" and whatever -- e f g
Substitution
-- MATCHES. backrefs should be " b" and " c d" -- a b c d e -- MATCHES. backrefs should be "" and whatever -- a c c d e -- MATCHES. backrefs should be " b" and "" -- b e -- MATCHES. backrefs should be " b" and " c" -- b c e -- MATCHES. backrefs should be "" and whatever -- e f g