replacing a value in string using aregular expression pyhton

JavaScript
import re
s = "Example String"
replaced = re.sub('[ES]', 'a', s)
print replaced import re

s = '[email protected] [email protected] [email protected]'

print(re.sub('[a-z]*@', '[email protected]', s))
# [email protected] [email protected] [email protected]

Source

Also in JavaScript: