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
/
^(?:(a);([^;\n]*);([^;\n]*)|.*)$
/
gm
Input 1
1
New
a;b;c a;x;23 b;b;12 a;xxx;bbb;34
Extraction
a;b;c a;x;23 b;b;12 a;xxx;bbb;34