Extracting text from email to notepad

You can use the below expressions to get all the different values using the assign activity

  1. Namevar = system.Text.RegularExpressions.Regex.Match(emailbodyvariable,“(?<=Name:\s).*”,RegexOptions.MultiLine).Value.Trim
  2. Sexvar = system.Text.RegularExpressions.Regex.Match(emailbodyvariable,“(?<=Sex:\s).*”,RegexOptions.MultiLine).Value.Trim
  3. Addressvar = system.Text.RegularExpressions.Regex.Match(emailbodyvariable,“(?<=Address:\s).*”,RegexOptions.MultiLine).Value.Trim
  4. Phonevar = system.Text.RegularExpressions.Regex.Match(emailbodyvariable,“(?<=Phone number:\s).*\d$”,RegexOptions.MultiLine).Value.Trim