Regex to string, HOW?

I’m really stuck trying to figure out how to get a regex result from matches into a string.
The regex result is stored as an IEnumerable.
How can I get the result written to any output or a string variable?
(text, excel, word,…) doesn’t matter as long as I can actually see and access the result.

If there is some code I need to add next to the variable, where can I search for it myself?

Any help, however small, will be greatly appreciated!
Even if you can just point me in the right direction.

Thanks!

If single result : varIenum(0).ToString

If multiple use for each( object)

Hi, Thanks for the help.
I expect multiple results.

Do I need to type “for each( object)” into the results (properties)?
(This is not working)

Or do I need to create a “for each” activity?
If that’s the case what should I put in the “Do”?

Thanks for your advice!

3 Likes

Thanks!
That made things a whole lot clearer.

Just as a quick tip Niels that I found out the hard way when starting out;
I ran into a few issues using regex where UiPath wasn’t returning the right results, until I started using regex that is specifically .Net so I use .NET Regex Tester - Regex Storm
to test my regex and I haven’t come across any issues with the regex code when moved into UiPath. Best of luck and have fun. Regex and UiPath is a powerful combination~!

3 Likes

Awesome, Thank you very much!
This will help me alot :slight_smile:

1 Like