Skip to main content

Hello everyone. 

I need help with a regular expression that extracts comments only from the LastApproverComments variable. I tried below () but it doesn't trim out the part with outcome, date and time.

210915_pastedImage_1.png

Here's the regular expression I used: .*NotsRequired).*

And the string:

John Doe (Approve) 21/11/2017 2:48 PM - 21/11/2017 2:48 PM
(John Doe) I want only this comment to appear
Michael Jackson (Not Required) 11/2/2015 2:48 PM -
Mike William (Not Required) 21/11/2017 2:48 PM -
Paul Smith (Not Required) 21/11/2017 2:48 PM -

Use below steps.

210924_pastedImage_1.png

1. Set Variable.

210927_pastedImage_4.png

2. Regular Expression.

210925_pastedImage_2.png

3. Regular Expression.

210926_pastedImage_3.png


Thanks for your response Lakshmi C‌. Your solution works, but I also want to show the name of the person who commented.

For example, from below comment, 

John Doe (Approve) 21/11/2017 2:48 PM - 21/11/2017 2:48 PM
(John Doe) I want only this comment to appear
Michael Jackson (Not Required) 11/2/2015 2:48 PM - 
Mike William (Not Required) 21/11/2017 2:48 PM - 
Paul Smith (Not Required) 21/11/2017 2:48 PM -

I want to remain with 

(John Doe) I want only this comment to appear


Method 1 - you can use 'Set Variable' action like below.

210950_pastedImage_3.png

You can use 'Last Task Respondent Display Name' or 'Initiator's Display Name' then append with your formatted 'Approve Comments' workflow variable.

Method 2

Step 1:

210936_pastedImage_1.png

Step 2:

210937_pastedImage_2.png


Great! This is exactly what I wanted. Thanks


Reply