0

I want to remove only the period that are within double quotes. I have tried this but it doesn't seem to be working.

txt = """ Says Chief Counsel of her performance, "She was a liar. She was an unethical, dishonest lawyer. She conspired to violate the Constitution, the rules of the House, the rules of the committee and the rules of confidentiality."as wife. of governor. she invests $1,000 in cattle futures. makes $100,000."""
x = re.sub(r'.(?=\w+\")',' ',txt)
Ismael Padilla
  • 5,246
  • 4
  • 23
  • 35

0 Answers0