Regular Expressions 101

Community Patterns

Find all commas that are not in parenthesis. Used in SQL_Pretty_Format()

0

Regular Expression
ECMAScript (JavaScript)

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

Description

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

Submitted by Ben - 3 years ago