Nothing wrong with regsubex Lindrian it was designed to do text replacing so why not take advantage of it ?
Not to say the TheImrac's regex couldn't be shortened somewhat:
alias charcheck return $regsubex($1-,/(?<=\s|^)([^ $chr($2) ])/gx,$chr($2)\1)
but thats not really an issue :_