How to remove all whitespace?


#1

Hi,
Need help!
I want to delete all whitespace and if I use Trim() it’s only for the first and last whitespace of the string. I’ve tried string.replaceAll("\s","") then an error occured. groovy don’t recognise the method replaceAll()
Thank you.


#2

@njara_rakotoRY Are you using RPA Express or SPA tool?


#3

I use RPA Express


#4

Hi @njara_rakotoRY,

Use “Trim Whitespace” feature under “Text” in Action library. Also if you are looking remove white spaces in between the string, you can use substring option and join the strings once the spaces are removed. Hope it helps !

Thanks,
Narendra


#5

Do you know what kind of whitespace there is in the file in advance (spaces, new line brakes) or can it be anything?


#6