Community Patterns

Community Library Entry

4

Regular Expression
Created·2014-04-25 11:43
Flavor·PCRE (Legacy)

/
(\((?:([^\(\)]*)|(?:(?2)(?1)(?2))*)\))
/
Open regex in editor

Description

Finds the outermost pair of parentheses. Compatible with any amount of nesting

Submitted by Jonas Gerneth