I'm fairly new to flow and wanted to extract an email address out of a planner tasks body. They body always looks the same. The very first row always looks like his:
Contact: something@whatever.com (can vary in length)
text text text
I would like to send out an email if the task is closed to the mail address in the first row. How could I achieve this?
This is what I've tried so far and it's not working at all:
substring(body('get_task_details')?['description'], 10,lastIndexOf(body('get_task_details')?['description'],))
But I can not quite wrap my head around it yet, it looks like this thus far:

I appreciate your help!