Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
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!
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.