How to remove all whitespace?


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.


@njara_rakotoRY Are you using RPA Express or SPA tool?


I use RPA Express


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 !



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