I have this kind of text. -> Roberto is an insurance agent who sells two types of policies: a $$\$$50,000$$ policy and a $$\$$100,000$$ policy. Last month, his goal was to sell at least 57 insurance policies. While he did not meet his goal, the total value of the policies he sold was over $$\$$3,000,000$$. Which of the following systems of inequalities describes $$x$$, the possible number of $$\$$50,000$$ policies, and $$y$$, the possible number of $$\$$100,000$$ policies, that Roberto sold last month?
I want to replace expressions containing dollar signs such as $$\$$50,000$$. Removing things such as $$y$$ worked out quite well, but the expressions that contain escape sequence doesn't work well.
This is the code I used.
re.sub("$$\$$.*?$$", "", text)
This didn't work, and I found out that \ is a escape str, so should be written as \. So I replaced the expression as below.
re.sub("$$\\$$.*?$$", "", text)
However, this again didn't work. What am I doing wrong ? Thanks a lot in advance ...