Why does re.sub not work for all matches in multiline mode?
I am using regex to parse the contents of a file using python. I use re.sub
to remove comments before parsing, by removing any text from any line beginning with #
.
I am using regex to parse the contents of a file using python. I use re.sub
to remove comments before parsing, by removing any text from any line beginning with #
.