I want to remove the data between single quotes i.e. avcd
a = 'avcd';
I am using this code. Although, i am getting the the text data from a text file.
text = 'acbnmmff hjkki.
It is recommended'
r = re.sub(r"= '.*?';", '', text.rstrip('\r\n'))
My code is working fine but when the text contains any newline, then it fails at the new line.
How can i make it work
re.MULTILINEflag to your regular expression. docs.python.org/2/library/re.html#re.MULTILINE