Home
Tester
Reference
About
Pattern
[^,()]*(?:\(([^()]*|(?<open>\()|(?<-open>\)))*(?(open)(?!))\))*[^,()]*
Input
a
,
(a,ab,(ad))(a,b)
,
b
a,(a,ab,(ad))(a,b),b
Options
Ignore Case
Ignore Whitespace
Explicit Capture
Culture Invariant
Singleline
Multiline
Right To Left
ECMA Script
Start from position:
Max matches to find:
Replacement
Replace matches with...
Click the
context
tab to see replacements.
Regex Info
Table
Context
Split List
6
matches found in about
16
milliseconds.
Show Permalink
Permalink
Index
Position
Matched String
$1
${open}
0
0
a
empty string
empty string
1
1
empty string
empty string
empty string
2
2
(a,ab,(ad))(a,b)
empty string
7 captures
a,ab,
(
ad
)
empty string
a,b
empty string
empty string
3
18
empty string
empty string
empty string
4
19
b
empty string
empty string
5
20
empty string
empty string
empty string
a
,
(a,ab,(ad))(a,b)
,
b
empty string
empty string
,
empty string
empty string
,
empty string
empty string