Is it possible to search for more than one bit of text to replace in a string.
replace("This*and This%", ('*', '%'), " ")
... Obviously the above doesn't work :s
I can't think of any efficient alternatives...
replace(replace("This*and This%", "*", " ")), "%", " ")
This works ^^ But just doesn't seem right. Maybe I'm just being anal <img src="smileys/smiley5.gif" border="0" align="middle" />
Thanks in advanced!
Develop games in your browser. Powerful, performant & highly capable.
String is a set of caracters, i don't think it's needed to use * and %, are for math functions.
Perhaps you should use & which can connect between the strings
Sorry, this was just an example! It's actually for a music program...
Here is a better example:
replace("A2,A3,A4", ('2', '3', '4'), "A5")
(Best example I could come up with right now) <img src="smileys/smiley13.gif" border="0" align="middle" />
The second way you mentioned is the way to do it, you can only replace one string at a time.
Thanks mate! It actually makes a lot of sense now that I got my head around it.
Thanks for that comment "use &" it solved my problem as well for using things like "Stone:"&Mountain.Stone :)