Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
,|\((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\)
/
gm

Description

Find all commas that are not in parenthesis or square brackets.

Submitted by Ben - 4 years ago