Need help with an unusual String manipulation

Hi All,

I am scraping a text from the application using the Get Visible text activity. The output is a string, that I am struggling to manipulate. I used the regex, but it removes all the spaces and I need an indicator like a pipe or any other symbol in between the words. I am planning to convert them and add them to the list. The output result and the desired result are below. Any help is greatly appreciated.


Desired result: ABCDEFGHI~2.00EA~1.00EA~0.0000

can you check this:


Much appreciate your help. It looks like forum platform automatically removes extra spaces. The problem is there is like 10 spaces in between the words. Please refer to the attached screenshot.

use format button </> from editor in future

1 Like

I did it didn’t help.

I used the following

the result of the text is nothing instead it removes everything and leaves just space


yes, sure. It is Regex.Replace to use

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

Thank you @ppr

Any idea what am I missing here?



Yes, the replace string

Regex.Replace(GetItem, "\b\ +", "~")

1 Like

Thank you very much @ppr it worked !

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