You could lookahead and lookbehind for not start/end of string.
Take a look in perlre for (?!pattern) and (?<!pattern)
In reply to Re: character from middle
by Utilitarian
in thread character from middle
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |