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 need to pick in a text everything before and after a character.
What need to use? Regex? Or something else?
--Button1 Result: 100
---Button2 Result: Hello[/code:2tlpdr0l]
So what i need is to use 2 different buttons, 2 different lines of code.
The first button is to pick everything before "," symbol, so in this example we have "100"
And the second button is to pick everything after "," symbol, so in this example we have "Hello"
Any help? Thanks!
Develop games in your browser. Powerful, performant & highly capable.
Tokenat() expression is perfect for this.
Tokenat(s, 0, ",") will return "100"
Tokenat(s, 1, ",") will return "Hello"
Thanks a lot!