Hi glos,
the problem in your initial regex is, that it only matches words with at least two letters.
Therefore 'A ' is not caught and not changed.
You could try to change the '+' in [^\s]+ to '*'.
Then it should catch single letter words, too.
Please, be careful and try it out locally first.
|