Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:取数有错误

1楼
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

输出结果有错误。
2楼
有点蓝 发表于: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
共2 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02734 s, 2 queries.