Skip to content

Instantly share code, notes, and snippets.

@subtleGradient
Created August 4, 2008 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save subtleGradient/3895 to your computer and use it in GitHub Desktop.
Save subtleGradient/3895 to your computer and use it in GitHub Desktop.
(?x)
(?<one> # start of bracket 1
\( # match an opening angle bracket
(?:
[^\(\)]++ # one or more non angle brackets, non backtracking
|
\g<one> # recurse to bracket 1
)*
\) # match a closing angle bracket
) # end of bracket 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment