Not working in UIPath Matches

Good day.

Why is my regex not working in actual run?
Below is my test inside the Matches activity, but when in the actual run, it cannot find any match while still using the same inputs.

image

@jrzcawaling

Can you share the actual string which you are using for Matches and not working?

Thanks

Hi,

Probably you got the data from local panel and it’s C# style expression like double quote is \" for example.

Can you try the following?

System.Text.RegularExpressions.Regex.Match(text,"(?<=HYPERLINK\s"").*?(?="")")

Regards,

2 Likes

Hi @Yoichi,

Your solution worked! Thank you.

This solution is working only in the “Assign” activity. In “Matches” it’s still not working. Any idea why?

Thank you very much.

1 Like

Hi @Srini84,

Here’s the regex I’m using in Matches activity.
(?<=HYPERLINK\s"“).*?(?=”")

Thanks

Hi,

How do you check match strings? We need to check them as the following for example.

Regards,

I’m checking the match result just like in your image. Weirdly enough, “Matches” activity doesn’t give any result. I will be using “Assign” activity for now as its getting the result I needed.

Thanks again for the help.

1 Like

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