AnsweredAssumed Answered

Exclude text from a regular expression

Question asked by kdorn on Jul 5, 2017
Latest reply on Oct 9, 2017 by nmarples

Greetings,

I am using Nintex On-Prem for SharePoint 2010. I am currently working on an  multiple approver Lazy Approval workflow. My goal is to extract the approver name and approver comments. I can capture the comments however when I do I get the text of the email stored in the variable as well. I need some assistance in creating a regular expression to strip out everything after the approval comments. I'm and admin and normally this would go to our developer who is out. The brief version of the text is here:

BIZ\DornKev -LazyApproval by MyEmailAddress Approve
Comment 1

 

From: Approvals-UAT@sharepoint-uat.[mailto:Approvals-UAT@sharepoint-uat.
Sent: Wednesday, July 05, 2017 9:35 AM
To: Kevin Dorn <kevin.dorn@
Subject: Approval Required [#DDDZPKAQKNSJ#]

 

*******TEST SITE******
Workflow Notification
________________________________

 

You can approve this item by replying to this email with one of the following answers on the first line of the email:

 

Approve 

Below this is the text of the email that lists out item specific data that goes to the approver.

My current RegEx Pattern is 

Replace/Ignore Case

([\w\s,]+)\s\([\w\s]+\)\s(?:[\d:.\/\s\w\-]+)\s\([\w\s,]+\)\s(?<Comment>.*)

Replacement text Comment : "${Comment}"

Can someone guide me as to how to craft a RegEx that grabs everything before the FROM line above?

Any help is greatly appreciated

Kevin

Outcomes