55问答网
所有问题
如何用正则表达式去除一个字符串里面的数字和小数点以外的字符
如题所述
举报该问题
推荐答案 2017-06-23
var reg = /[^\d\.]/g;
var html = "sdf12.323.sdf3sd.32";
html.replace(reg,"");
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://55.wendadaohang.com/zd/cFGRQLFc4cIcL4LLeF.html
相似回答
大家正在搜
相关问题
如何用正则表达式去除一个字符串里面的数字和小数点以外的字符
正则表达式怎么匹配所有非数字和小数点的其他字符
JS如何去除字符串里中英文数字以外的字符
java中,正则表达式,如何过滤除数字和字母之外的其它字符?...
正则表达式匹配匹配除小数点外其他字符
删除字符串中的数字,JavaScript正则表达式怎么写?
请问要去除字符串里面 除了,。以外的所有标点,应该怎么写正则...
求正则表达式,验证一个字符串只能由小数点和数字组成,不能有其...