Solved

Regular Expression help to extract task acceptor name from task comment

  • 17 April 2020
  • 2 replies
  • 24 views

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. 

 

7449iC1DCC048ABAC67F9.png

 

7448i80458DBC6F61CE21.png

 

7450i28A10BD9B1D78279.png

 

7451iAC864444053A4C43.png

 

7452iABF3930E56243825.png

 

icon

Best answer by SimonMuntz 20 April 2020, 06:21

View original

2 replies

Userlevel 6
Badge +22
Hi,

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

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

Reply