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
@"
\[(?>[^][]+|(?<c>)\[|(?<-c>)])+]
"
gm
Input 1
1
New
[A] + -[B123]=0 [Test[0]]=0 [value] in the [text[42]] and [1[2[3]]]!
Extraction
[A] + -[B123]=0 [Test[0]]=0 [value] in the [text[42]] and [1[2[3]]]!