以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何获取字符串中的数值部分  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=115153)

--  作者:lihe60
--  发布时间:2018/3/1 20:59:00
--  如何获取字符串中的数值部分
如题
--  作者:有点甜
--  发布时间:2018/3/1 22:00:00
--  

参考

 

Dim str As String = "abc123456ccceee123"
Dim mc = System.Text.RegularExpressions.Regex.Matches(str, "[0-9]+")
msgbox(mc.count)
msgbox(mc(0).value)