I'd like to create a regex statement in Python 2.7.8 that will substitute characters. It will work like this...
ó -> o
ú -> u
é -> e
á -> a
í -> i
ù,ú -> u
These are the only unicode characters that I would like to change. Such unicode characters as, ë, ä
I don't want to change. So the word, thójlà
will become tholja
. I'm sure there is a way so that I don't have to create all the regex separately like below.
word = re.sub(ur'ó', ur'o', word)
word = re.sub(ur'ú', ur'u', word)
word = re.sub(ur'é', ur'e', word)
....
I've been trying to figure this out but haven't had any luck. Any help is appreciated!