I have a string. I need to parse it, replacing any chars (except numbers (0
to 9
),,
and .
.
How can I do it with javascript?
Tried with :
string.replace(/[a-zA-Z]*/, "");
but seems it doesnt works. Also, I need ANY chars, not only a-Z (also ?, /, white space, and so on, expect, as said, , and .
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…