Hi list...
I'm trying to build a simple search engine where users enter one or more
keywords. But first, I'm trying to format a nice clean array based on
what's entered, taking into account extra spaces, commas, etc. Any
ideas? Below isn't really working for me.
// criteria is the text entered into the input field ("Dog,
cat,squirrel, bird - horse:worm")
var changeToSpaces:Array = [",",", ", "-"," - ",":",": ","\r","\t"];
for(var i=0;i<changeToSpaces.length;i++){
this.criteria[0].split(changeToSpaces[i]);
}
Ideal result is:
["Dog", "cat", "squirrel", "bird", "horse", "worm"]
Thanks!
- Michael M.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders