AnsweredAssumed Answered

Regular Expressions - Remove all lines after match

Question asked by unitrin on Aug 10, 2016
Latest reply on Aug 11, 2016 by colin_e

I noticed that when I receive a Lazy Approval task response, the entire email thread is included in the Task Approver Comments.  I would like to Remove/Strip all lines of text in the Task Approver Comments that follow my matched <keyword>.

 

I'm using the Regular Expression action in Nintex and my pattern code is:

[\w\s,.:]\<keyword>:.* (In the image below, I used "Lazy" as my <keyword>)

 

This works great for the first line, but I have about 50 more lines below this that I'd like to remove in this action.

Is there a way to add to my formula to remove all characters after my keyword?

 

Thanks!

 

Outcomes