Is there a way I can split by more than one character? I do not mean a combination of characters, but an array of specific choices. For example:
s = "john is tall,sue is small";
s.split(" ");
trace(s);
The output in this circumstance would be:
'john' 'is' 'tall,sue' 'is' 'small'
However, what if I wanted to edit out the comma as well such that the output was:
'john' 'is' 'tall' 'sue' 'is' 'small'
How can I do this? I’m pretty sure it’s done with regex, but I’m a little lost.
Thank you in advance!
AS3’s
split()method accepts a regular-expression as input, so you should be able to use the following: