vb分析文本

来源:百度知道 编辑:UC知道 时间:2024/05/14 09:00:13
我在 text1.text 里面有 ******<A>XXXXXXXXXXX</A>******
如何才能在text2.text中显示XXXXXXXXXXXX
X、*为随机内容

把Text2换成RichTextBox,设置TextRTF属性就行了
因为这个是HTML代码
不懂的话加我QQ137707827(8.4中午)
上线我告诉你

s1 = split(text1,"<A>")
s2 = split(s1(1),"</A>")
msgbox s2(0)

's2(0)为你想要的东西

设置按钮command1
Private Sub Command1_Click()
dim x,z
dim y1,y2,y3,y4
for x=1 to len(text1.text)
y1=mid(text1.text,x,3)
if y1="<A>" then
exit for
goto Enn
end if
next
msgbox "no!"
exit sub
enn:
for z=x+3 to len(text1.text)
y2=mid(text1.text,z,4)
if y2="</A>" then exit for
text2=text2+mid(text1.text,z,1)
next