How to extract particular text using Match activity in Uipath

@_Bhagyashree

Then first thing the regex you are using is not giving any data may be there are changes to input that what ypu provided here.

Second please confirm if your type argument is of type match

And then I see the log message inside for loop which says currwntitem.tostring which should be currentitem.Value…

Cheers

Yes i have checked the xaml file…Everything is same

Hi @Gokul001

Flowchart1.xaml (39.9 KB)

Flowchart2.xaml (125.4 KB)

Please check this

In the For each Type Argument is → Object

This the expression.

System.Text.RegularExpressions.Regex.Matches(YourString,"(?<=CompanyName:\s)\S.*(?=CompanyId)")

In your screenshot you have use System.Text.RegularExpressions as Type argument

In my Workflow

Can you share the input?

Check out this XAML file @_Bhagyashree

Flowchart1.xaml (36.7 KB)

Regards
Gokul

Yes,

You can see in the flowchart 2 its type is object only.

And the file which u have sent is not able to open showing as documenet is invalid.

Input is Created Request UIPK900246 with Task UIPK900247 for ABC

Check out this Image @_Bhagyashree

In my case the match value should be System.Text.RegularExpressions.Regex.Matches(TR,“(?<=Created Request\s)\S*”)

As you have shown here

What do you mean? @_Bhagyashree

I don’t think so you have check this XAML file? This topic is already solved in the 2nd post. For more detail you can jump into Uipath Academy to earn some knowledge

Hi @Gokul001

I have also used the same thing…

Can you print the Input in the Log message? @_Bhagyashree

Where did you get the input?

Have you test the process like this? What is the issue your are facing?

Regards
Gokul

I am able to print the input.
the input variable is TR

HI @_Bhagyashree

Share the Output Panel like this in the below image

image

Regards
gokul

Print the input value in the Log message and share the image

Hi @_Bhagyashree

TR is assigned properly in the workflow. As i say in your XAML file i Can’t find the Input. Can you check it out?

Hi,

Check flowchart 2