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.

@honey.123.631

If only one value is needed then

Outmatch(0).Value

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

Cheers

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
DataArray=TextData.Split(Environment.NewLine.ToCharArray(),StringSplitOptions.RemoveEmptyEntries)
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

@honey.123.631

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

cheers