I am trying to extract the content that spans over multi lines. The content looks like this:
some content here
[1/1/2015 - SSR] something
[1/2/2015 - SSR] another:
*something here
*another something here
not relevant, should not be returned
[1/3/2015 - SSR] another one
There is always a space before the *
The code I am using is:
re.search(r'.*- SSR](.*)',line,re.DOTALL)
The expected output is:
[1/1/2015 - SSR] something
[1/2/2015 - SSR] another:
*something here
*another something here
[1/3/2015 - SSR] another one
However it only retrieve the first and the third record, not the second one. Since it ranges multilines. Can anybody help? I would really appreciate it.