python replace character in string when not match regex code example
Example: python regex substitute
import re
s = "Example String"
replaced = re.sub('[ES]', 'a', s)
print replaced
import re
s = "Example String"
replaced = re.sub('[ES]', 'a', s)
print replaced