Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Game development stories & opinions
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!
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
Develop games in your browser. Powerful, performant & highly capable.