Hi @Anonymous,
Could you please share a sample of your incoming email?
Do you want to change the Subject of the received email to "Person: Jack joe"?
Further, do you want to use regex within Microsoft Flow?
The regex is not supported in Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:
https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas
I assume that your incoming email shows as below:
I have made a test on my side and please take a try with the following workaround:
- Add a "When a new email arrives" trigger.
- Add a "Compose" action, Inputs field set to following formula:
add(indexOf(triggerBody()?['Subject'],'Application for'),16)
- Add a "Compose 2" action, Inputs field set to following formula:
sub(indexOf(triggerBody()?['Subject'],'from'),1)
- Add a "Compose 3" action, Inputs field set to following formula:
substring(triggerBody()?['Subject'],outputs('Compose'),sub(outputs('Compose_2'),outputs('Compose')))
- Add a "Compose 4" action, Inputs field set to following formula:
concat('Person: ',outputs('Compose_3'))
Image reference:
The flow works successfully as below:
More details about using expression in flow actions, please check the following article:
Use expression in flow actions
Best regards,
Kris