Caveat: doesn't work if you need to support nested bar/qux pairs, e.g. only replacing the first and last foo in: foo bar foo bar foo qux foo qux foo
In reply to Re^3: Match a pattern only if it is not within another pattern
by ysth
in thread Match a pattern only if it is not within another pattern
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |