易语言 正则表达式 如何取里面的数字 19.90 29.0 129.90 10
["19.90","29.00","35.00","19.89","39.00","39.80","129.90","36.00","29.80","27.80","49...
["19.90","29.00","35.00","19.89","39.00","39.80","129.90","36.00","29.80","27.80","49.00","29.00"]
展开
4个回答
展开全部
.版本 2
.支持库 RegEx
.支持库 spec
.局部变量 正则, 正则表达式
.局部变量 结果, 搜索结果, , "0"
.局部变量 N, 整数型
' 常量1=["19.90","29.00","35.00","19.89","39.00","39.80","129.90","36.00","29.80","27.80","49.00","29.00"]
正则.创建 (“(\d+.\d+)”, )
结果 = 正则.搜索全部 (#常量1)
.计次循环首 (取数组成员数 (结果), N)
调试输出 (结果 [N].取子匹配文本 (#常量1, 1, ))
.计次循环尾 ()
不能上传附件 不知道什么原因 就这样吧
推荐于2017-07-14
展开全部
正则.创建 (“\d\d.\d\d”, #常量1)
追问
129.00 忽略了这个数
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询