How to extract a specific word in a outlook email

Dear Ptp,

The following invoice has a unit price greater than the unit price on the PO and has been identified as an Document (i.e. no valid approver exists in game to handle the required approval or escalation).

-Purchase Order 0000000000 //i want to extract the Purchase Order number

-Quantity mismatch on Line Item(s): 000

-vendor Name xxxxxxx xxxxx xxxx

If the entire text is stored in a variable,

then use this @laraiv13

text.Substring(text.IndexOf("Purchase Order ")+"Purchase Order ".Length).Split(Environment.NewLine.ToCharArray)(0)

it’s not working. maybe i’m doing wrong

You can use Matches activity and this Regex pattern:

“(?<=Purchase Order).*”