简单的字串切割vb.net

原始字串aaaa,bbb,ddd,eee,sss,ffdsa

---------------切成以下两个字串-------------------

dim 字串1 as string=aaaa

dim 字串2 as string= or 0=bbb,|or 0=ddd,|or 0=eee,|or 0=sss,|or 0=ffdsa

字串1,就只有开头最前面的
字串2 串起来就比较特殊,用到 ,|or 0= 去做间隔


烙印99
浏览 218回答 2
2回答

30秒到达战场

Dim a() As String = System.Text.RegularExpressions.Regex.Split(TextBox1.Text, ",")Dim 字符串1 As String = a(0)Dim 字符串2 As String = "or 0="For i = 1 To UBound(a)If (i = 1) Then字符串2 += a(i)else字符串2 += ",|or 0= " & a(i)End IfNext
打开App,查看更多内容
随时随地看视频慕课网APP