I want to search for all the text that starts with the word "abc" and ends with a ";". This text can span across multiple lines and can have space/tab in-between them.
I tried, re.compile(r"""abc.+;""", re.DOTALL)
It returns everying from the first occurance of "abc" to the last occurance of ";" as a single object. But I want the first "abc" to match to first ";" in first object, second "abc" to second ";" in second object and so on
I also tried, re.MULTILINE, it returns nothing.
None of the following worked:
re.compile(r"""abc(.|\s)+;""", re.MULTILINE)
re.compile(r"""abc[.\s]+;""", re.MULTILINE)
Any help is appreciated.