Code:
str = "1x2_3 4";
str2 = str.replace(/\D/, "");
This will replace the x, but I want to replace all non-numerics. I am looking for the most efficient way(I don't want a loop).
Thanks.