You are using \2 to match the second delimiter but the second delimiter is not required to be the same character as the first one. Consider m{braces as delimiters} for example. Other pairs to watch for include m[ ], m( ), and even m< >.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: A Regex to identify Regex's / Compiling a regex
by sauoq
in thread A Regex to identify Regex's / Compiling a regex
by knowmad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |