How to remove extra characters in a string?

Hi Friends,

These are the logs of my putty session which i’m copying into NOTEPAD FILE. i want to remove extra characters likee[He[J before dollar symbol.
Input:
e[He[J[test@server~] ps -elf | grep "test\-e2e" [test@server~] clear
e[He[J[test@server~]$ /foss/foss-ews/scripts/current/start test-e2e

Output:
[test@server~] ps -elf | grep "test\-e2e" [test@server~] clear
[test@server~]$ /foss/foss-ews/scripts/current/start test-e2e

Kindly help.
Thanks,
Chandini.

Hello @chandinid407,

e[He[J = Will this always remain same??

If so, you can do this StrVar = StrVar.Replace(“e[He[J”,"")

Cheers
@chandinid407

1 Like


Hi Pradeep,
sharing you screenshot of actual characters in a string.
when i use replace function i’m facing below error in uipath.

Thanks,
chandini.

1 Like

Yeah, Copy that text and replace with above mentioned method!

This error is not related to that!

Cheers
@chandinid407