Looks like you are in a text variable. Split text by new line to a list variable %SplitText%.
Create List %ExtractedText%
Loop 0 to %SplitText.Count - 1% increment of 1
Get Subtext %SplitText[LoopIndex]% from start to 10 - Save as %SubText%
If %SubText% equals “TASK NAME”
Set %CurrentExtract% to %SplitText[LoopIndex + 1]%
Add %CurrentExtract% to List %ExtractedText%
End(If)
End(Loop)
Now all your extracted texts are in a list in the same order that you processed each iteration of combing through the texts.