Well, technically the OP does say "surrounded", ...
Actually not.
And the examples given do not indicate this possibility either.
Perhaps more important is that "reversible bracketing" doesn't really make much sense. Consider
foo < foo > foo < foo < foo > foo > foo < foo < foo > foo < foo > foo +> foo 123 |.....|.....| |.....| |.....| |.....|.....|.....| + 123 |.................| |............................. +|
Can you conceive of an application where this would make sense?
In reply to Re^5: Match a pattern only if it is not within another pattern
by BrowserUk
in thread Match a pattern only if it is not within another pattern
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |