I am doing some text normalization using python and regular expressions. I would like to substitute all \'u\'or \'U\'s with \'you\'. Here is what I have done so far:
it can also be achieved with below code
import re text = 'how are u? umberella u! u. U. U@ U# u ' print (re.sub (r'[uU] ( [^a-z] )', r' you\1 ', text))
or
print (re.sub (r'[uU] ( [\s!,.?@#] )', r' you\1 ', text))