以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 取数有错误 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=192230) |
-- 作者:lihe60 -- 发布时间:2024/6/4 13:33:00 -- 取数有错误 Dim str As String = "计量单位" For Each s As String In str.split(",") Dim mc = System.Text.RegularExpressions.Regex.Matches(s, "[0-9.]+") MessageBox.Show(mc(0).value) \' m = mc(0).value Next 输出结果有错误。
|
-- 作者:有点蓝 -- 发布时间:2024/6/4 13:58:00 -- Dim str As String = "计量单位" Dim r As New System.Text.RegularExpressions.Regex("[0-9.]+") For Each s As String In str.split(",") If r.isMatch(s) Then Dim mc = r.Matches(s) MessageBox.Show(mc(0).value) End If Next
|