I have a process that takes the body of an email and i use regex to pull out certain data. I have 3 instances were it is pulling the correct data but also pulling the last 2 characters of my regex expression. All of the other instances work just fine.
Here is the expressions and images to reference. How do i get it to not have that first 2 characters?
-
System.Text.RegularExpressions.Regex.Match(EmailBody,“(?<=Keep email address for how long?).+”.Trim).ToString
-
System.Text.RegularExpressions.Regex.Match(EmailBody,“(?<=Who will be monitoring mailbox?).+”.Trim).ToString
-
System.Text.RegularExpressions.Regex.Match(EmailBody,“(?<=Auto response until?).+”.Trim).ToString
Here is the output:
Here is what EmailBody variable is written in a message box: