cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Regular Expression help to extract task acceptor name from task comment

Jump to solution

I'm trying to extract the task acceptor name from the task comment to be able to assign the next task to the same person. From previous posts I learned that this can be accomplished by using a regular expression to extract the name from the task comment. I've tried to do this but when I do this I don't get anything. I've tested the following two regular expressions in regexr.com on the comment result and it shows it should pull the name, however when I use it in the regular expression in Ninetex o365 I get no result. I've tried

 

^\w+[,][\s]w+ and (^\w+)(.?)(?=\()

 

to extract the first two words since the comment field displays as 

 

lastname, firstname (action) 4/17/2020 10:01:58 AM - 4/17/2020 10:44:18 AM - [] :  

 

The collection always displays [] as the result with an item count of 0

 

I'm using a Regular Expresson as follows:

 

String: {variable: Task_Lev01A_Comment}       (this was saved in the task as a text variable from task comments)

String Operation: extract

Pattern: ^\w+[,][\s]w+

Output: Task1_Acceptor   (this is a created workflow variable of type collection)

 

What am I doing wrong? Does anyone have a regular expression that would work? am I missing something critical?, is there another way to do this. I've read other ways to try and get this info, but they are all way above my skillset since I cannot even tell what they are talking about. 

 

Step01.png

 

Step02.png

 

Step03.png

 

Step04.png

 

Step05.png

 

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Regular Expression help to extract task acceptor name from task comment

Jump to solution
Hi,

Use the following pattern:
(\w+),.(\w+)
Tested and it works,

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: Regular Expression help to extract task acceptor name from task comment

Jump to solution

Thank you so much Simon, works like a charm! much appreciated.

0 Kudos
Reply