I have some text where I removed many special characters with the replace expression in my program. Now I have too many whitespaces in between the words and I need to make sure that there only is one. How do I do that?
I already found something with the regexreplace expression, but I didn't really understand how it works. :/
Any help is appreciated!
Develop games in your browser. Powerful, performant & highly capable.
you can simply use replace(src," "," ") to turn double spaces into single spaces.
(The forum auto corrects the double spaces between the first set of quotations, so make sure you have two there, or however many you want.)
I was hoping to find a more dynamic solution, so that it can replace any number of whitespaces with one.
Your solution works though