For an explanation of (?>...) see How backtracking works in regular expressions and Avoiding regex backtracking.
In reply to Re^3: balanced parens regexp hangs
by moritz
in thread balanced parens regexp hangs - solved
by grizzley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |