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
r"
^(?:[^C\n]|C[^V\n]|CV[^S\n]|CVS.).*|^CV?$
"
gm
Unit Tests
CVS
→ regex does not match
CV
→ regex does match
C
xVS
→ regex does match
CxS
→ regex does match
CVx
→ regex does match
a
different
string
→ regex does match
aCVS
→ regex does match
CVS
and
more
→ regex does match