match pattern and replace in python code example
Example: replacing a value in string using aregular expression pyhton
import re
s = '[email protected] [email protected] [email protected]'
print(re.sub('[a-z]*@', 'ABC@', s))
# ABC@xxx.com ABC@yyy.com ABC@zzz.com