Hi Roberto,
That's not that a rare scenario in OutSystems and you can use Regular expressions to do that. In your dependencies, on the Text extension you will find Regex_Replace action to replace patterns in a string.
You can also take a look at Regex How To forge component on how to use it and test it both client and server side.
See here an example ran in the component forge sandbox that uses the Regex_Replace action and that replaces in the string the pattern {1} (the \ is to escape the special character { ):

Hope it helps.
Regards,
João