I thought I saw the answer to this question, but after a long time searching, I was not able to find it. In a workflow, I'd like to strip/extract the email address out of the value returned from a people picker field. I think I can use a regular expression, but am not sure how to configure it.
For example, I'd like to extract daniel.Smith@domain.onmicrosoft.com out of i:0#.f|membership|daniel.Smith@domain.onmicrosoft.com.
I figured it out. For anyone else who is having the same issue, here is what I did to strip out the text i:0#.f|membership| before the email address.
I used the "Replace Substring in String" action. My values are as follows:
I hope this helps.
There is a more simple way :
in a "set varaible", use the 'advence lookup', select your SharePoint field, and use select your return type for your SharePoint user Field. You can select the Email, display name, login or user ID.
Or and other ways is to extract the Email from the login text with a regex.
The regex is :