I have this string:
{example1}{example2}{example3}
This is the regular expression to find these { anything in it }:
/\{.*?\}/g
Now I want to know how put them in an array so I can do a for in statement.
I want an array something like array("{example1}","{example2}","{example3}"); ?
forloop rather than afor...in, which may give you more than you bargained for: all extensions toArray's prototype will be listed, as well as the items in the array.for-in. Use a C-styleforloop, preferably.