以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  字符串操作  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=115701)

--  作者:xxfoxtable
--  发布时间:2018/3/12 21:38:00
--  字符串操作
怎么写代码把字符串:电子设备(ID:2)变成:电子设备。再单独把数字取出来,字符串不一定多少汉字,数字不一定是几位
--  作者:有点蓝
--  发布时间:2018/3/12 21:50:00
--  
Dim str As String = "电fsdfsfds子设备(ID:24534)"
Dim ar() As String = str.Split("(")
msgbox(ar(0))
Dim s2() As String = ar(1).Split(":")
msgbox(s2(1).Replace(")",""))