Skip to main content
Participant
May 24, 2006
Question

extracting strings from a string

  • May 24, 2006
  • 2 replies
  • 256 views
Given the following string:

sendRPCDone(frameElement, "chelsea", new Array("chelsea", "chelsea fc", "chelsea football club", "chelsea building society", "chelsea charms", "chelsea flower show", "chelseafc", "chelsea piers", "chelsea football", "chelsea clinton"),

is it possible to extract each word delimited by " " (eg. "chelsea","chelsea fc"...) and store it in an array?

thanks
a
This topic has been closed for replies.

2 replies

Inspiring
May 24, 2006
I think it is myString.split('","'); but I'm not sure. I'm not with Flash at the moment, but have you tried?
Inspiring
May 24, 2006
Well, you know it is called a string and that would indicate it is a member of the string class. Go to the Help menu and get to the ActionScript Dictionary or the ActionScript 2.0 Language Reference (or whatever it is called in whichever version of Flash that you have).

There you will find everything you can do with strings – including String.split() and how to use it.
Participant
May 24, 2006
ok, but what about the " " issue? how do I split a string into strings according to " " delimitater parameter?
I can't use: myString.split(" " " ");
probably it's easy, but I am a AS novice
thanks anyway
;-)