Answers for "replacing a value in string using aregular expression pyhton"

2

python regex substitute

import re
s = "Example String"
replaced = re.sub('[ES]', 'a', s)
print replaced
Posted by: Guest on July-10-2020
0

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))
# [email protected] [email protected] [email protected]
Posted by: Guest on October-13-2020

Code answers related to "replacing a value in string using aregular expression pyhton"

Code answers related to "Javascript"

Browse Popular Code Answers by Language