Home
Tester
Reference
About
Pattern
\((?>[^()]+|(?<o>)\(|(?<-o>)\))*(?(o)(?!))\)|[^\s()]+
Input
(a + b)
*
c
*
(x - y)
(a * (x - y))
*
c
(a + b) * c * (x - y) (a * (x - y)) * c
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
8
matches found in about
8
milliseconds.
Show Permalink
Permalink
Index
Position
Matched String
${o}
0
0
(a + b)
empty string
1
8
*
empty string
2
10
c
empty string
3
12
*
empty string
4
14
(x - y)
empty string
5
23
(a * (x - y))
empty string
6
37
*
empty string
7
39
c
empty string
(a + b)
*
c
*
(x - y)
(a * (x - y))
*
c
empty string
whitespace
whitespace
whitespace
whitespace
whitespace
whitespace
whitespace
empty string