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
/
(?:(?<=\()\d+,\h*|,?\h*\d+\b)(?=[^()]*\))
/
gm
Input 1
Foo 12 (bar, 13) Foo 12 (13, bar, 14, bar) Foo (14, 13, 34) Foo 12 (bar, 13) Foo 12 (13, bar, 14) Foo (14, 13)
Extraction
Foo 12 (bar, 13) Foo 12 (13, bar, 14, bar) Foo (14, 13, 34) Foo 12 (bar, 13) Foo 12 (13, bar, 14) Foo (14, 13)