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
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
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!
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