in reply to Re: help with a regexpin thread help with a regexp
s/\b\w|\w\b/\U$&\E/g [download]
s/\A\w|\w\z/\U$&\E/g [download]