in reply to character from middle
You could lookahead and lookbehind for not start/end of string.
Take a look in perlre for (?!pattern) and (?<!pattern)