Im trying to extract text that lies between user and in the below text line: The following gives me a User ID which in want to extract

“added to user XXXXX in the”

Im using regex pattern, “(?<=” + labelbefore + “)(.*?)(?=” +labelafter + “)”

But it is not able to extract, match found is displayed as False. Can anyone help?

Hi @shreyaank

Actually the expression is working, i just hardcoded it like this, it worked

mention like this in expression of Matches activity buddy
“(?<= ’ ” + labelbefore + “ ')(.*?)(?= ’ ” +labelafter + “ ')”
but make sure that labelbefore and labelafter are two variables of type string
and get the output with a variable named out_matches and pass this in for each loop activity and keep the type argument as object
–inside the for each loop use a write line activity to display the value of the matches found by mentioning like this


this is the regex im using (?<=user\s)(.*)(?=\sin)
Flowchart.xaml (7.5 KB)

think you have set the variable of the label after and label before as generic please set it to string

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.