+ 1
How do I use re.sub in Regex to replace"quot; with "S"?
I tried to replace the meta character "
quot; in a text, but I'm not able to do so. Can anyone help me with this?3 Answers
+ 4
Did you use \ before the dollar sign in your regular expression?
+ 5
import re
s = '$hort'
s = re.sub(r'\#x27;, r'S', s)
0
Thank you both đ got itâđŒ