如何用split分割这段
text1内容为
百度<>baidu
微博<>weibo
那么如何用split使
label1显示为百度
label2显示为baidu
label3显示为微博
label4显示为weibo --------------------编程问答--------------------
--------------------编程问答--------------------
Dim Tex() As String
Tex = Split("百度<>baidu" & vbCrLf & "微博<>weibo", "<>")
If UBound(Tex) = -1 Then Exit Sub 'Or Function
Label1.Caption = Tex(0)
Label4.Caption = Tex(2)
Tex = Split(Tex(1), vbCrLf)
If UBound(Tex) = -1 Then Exit Sub 'Or Function
Label2.Caption = Tex(0)
Label3.Caption = Tex(1)
dim a() as string--------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答--------------------
a = split(text1,vbcrlf)
dim b() as string
b = split(a(0),"<>")
label1.caption = b(0)
label2.caption = b(1)
b = split(a(1),"<>")
label3.caption = b(0)
label4.caption = b(1)
补充:VB , 基础类