Regex Matches activity

Hi all,
I am using matches activity to get data from a text file and storing the output in IEnumerable.
How can I read this output in write line or message box.

Can anyone help me please

Hi @honey.123.631

You can use an Assign activity you store the output of the RegEx Match action:

regexOutput = System.Text.RegularExpressions.Regex.Matches(inputString,regexPattern).ToString

Hope this helps,
Best Regards.


If only one value is needed then


If multiple values use a for loop and inside currentitem.Value

If needed all at once then String.Join(",",outmatch.Cast(of System.Text.RegularExpressions.Regex.Match).Select(function(x) x.Value)) - this will join output with comma and write it

Hope this helps


First I am reading the text using read text file and saving that output as TextData(String)
Second I am converting this text to an array by using assign activity
Third I have used For each activity
in item I have passed DataArray and TypeArgument for Foreach I have taken as string
Fourth I have taken Matches activity
Input i have given item
Pattern I have given
Result I have saved as aIEnumerable variable
Now I want to take this result and put it in an excel but I am getting null value.
Can you please help me


Use a for loop after matches and then use for loop change type argument to System.Text.RegularExpressions.Regex.Match and inside loop use currentitem.value to get the each value

And if you are getting null may be your regex is not returning any values or may be there are not matches found