Possible Duplicate:
Question about regex exec returning only the first match
"x1y2z3".replace(/[0-9]/g,"a")
This code snippet returns "xayaza" as expected.
/[0-9]/g.exec("x1y2z3")
However, it only returns an array containing one item: ["1"]. Shouldn't it return all matches?
Thank you in advance!