cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Regular expression

Jump to solution

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.

Here's the regular expression I used: .*Not\sRequired\).*

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 -

Labels: (1)
0 Kudos
Reply
4 Replies
Workflow Hero

Re: Regular expression

Jump to solution

Use below steps.

1. Set Variable.

2. Regular Expression.

3. Regular Expression.

Reply
Workflow Hero

Re: Regular expression

Jump to solution

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

0 Kudos
Reply
Workflow Hero

Re: Regular expression

Jump to solution

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

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:

Step 2:

0 Kudos
Reply
Workflow Hero

Re: Regular expression

Jump to solution

Great! This is exactly what I wanted. Thanks

0 Kudos
Reply