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]*@', 'ABC@', s))
# [email protected] [email protected] [email protected]

Source

Also in JavaScript: