Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(?>(break;|:|{)[\r\n\s]*case) | (?<fallthrough>case)
/
gx
Input 1
1
New
switch (item) { case 1: case 2: doStuff(); break; case 3: case 4: doOtherStuff(); break; } switch (item) { case 1: case 2: doStuff(); // should detect this case 3: case 4: doOtherStuff(); break; }
Extraction