以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 问个字符串处理正则表达式 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=125502) |
-- 作者:huangxueyao -- 发布时间:2018/9/29 15:51:00 -- 问个字符串处理正则表达式 原:1.aaa,2.bbb,3.ccc 需:1,2,3 谢谢~
|
-- 作者:有点蓝 -- 发布时间:2018/9/29 16:07:00 -- Dim str As String = "1.aaa,2.bbb,3.ccc" Dim arr() As String = str.Split(new Char(){",","."}) For i As Integer = 0 To arr.Length - 1 Step 2 msgbox(arr(i)) Next
|
-- 作者:huangxueyao -- 发布时间:2018/9/29 16:39:00 -- 谢谢 |
-- 作者:wfkbabro -- 发布时间:2020/5/17 10:44:00 -- 以下是引用有点蓝在2018/9/29 16:07:00的发言:
Dim str As String = "1.aaa,2.bbb,3.ccc"
Dim arr() As String = str.Split(new Char(){",","."})
For i As Integer = 0 To arr.Length - 1 Step 2
msgbox(arr(i))
Next 收藏,妙。 |