I have a case where I have to break down a string that looks something like this:
TASK **********************************
everything ok
TASK **********************************
some text here untill you get dot retry.retry
TASK **********************************
everything ok
I want to capture only groups that have failed (have .retry at the end)
TASK **********************************
some text here untill you get dot retry.retry
So far I've come closest to what I need with the following regex, however, it only captures the first group and only the first group
(?m)(TASK.*\.retry)
Any suggestions?
edit:
re.findall(r"TASK.+?\.retry" , text, flags = re.DOTALL)
will find groups if they all end with .retry, this is how the question was originally phrased, but was wrong... my bad.
edit 2:
the duplicate answer does not exclude the groups that are ok, why is this flagged?