aaa=".........<font color=red>我要获取这段文字</font>...."如何获取<font color=red> 和 </font>中间这段中文?
中文字不是固定的, <font color=red> 和 </font>是固定不变的
中文字不是固定的, <font color=red> 和 </font>是固定不变的
解决方案 »
- 如何用VB实时获取当前系统的光标图案?
- 求教:如何获取MSFlexGrid1某一单元格的字体颜色,谢谢!!!
- 如何让控件根据窗体大小自动调整
- mis开发要具备的是什么????
- 请问得到一个应用在某个时刻所开窗口的句柄后,怎样在自己编的vb程序中对该窗口上的某个按钮后进行类似click的操作?
- VB与EXCEL数据问题
- vb怎么判断文本文件的编码格式?
- vb程序中通过OLE嵌入一个PowerPoint文件,我怎么才能操纵这个演示??????????
- 我在用insert into向ACCESS插入数据时,遇到一个问题?
- 帮帮忙,我是一个vb初学者,能提供一些小型项目供我开发??
- 一个很愚昧的问题
- 怎么样随即抽取数据库中的数据呢?
bbb = "<font color=red>"
ccc = "</font>"
a = InStr(1, aaa, bbb)
b = InStr(a, aaa, ccc)
MsgBox Mid(aaa, (a + Len(bbb)), (b - (a + Len(bbb))))
Private Function findstr(ByVal word1 As String, ByVal word2 As String, ByVal finds As String) As String
Dim i As Long, j As Long
i = Len(word1)
If i = 0 Then
Exit Function
findstr = ""
ElseIf i > Len(finds) Then
Exit Function
findstr = ""
End If
j = Len(word2)
If j = 0 Then
Exit Function
findstr = ""
ElseIf j > Len(finds) Then
Exit Function
findstr = ""
End If
Dim num1 As Long, num2 As Long
num1 = InStr(1, finds, word1)
If num1 = 0 Then
Exit Function
findstr = ""
End If
num2 = InStr(num1, finds, word2)
If num2 = 0 Then
Exit Function
findstr = ""
End If
Dim findlength As Long
findlength = num2 - num1 + Len(word2)
findstr = Mid(finds, num1, findlength)
End Function
Private Function findstr(ByVal word1 As String, ByVal word2 As String, ByVal finds As String) As String
Dim i As Long, j As Long
i = Len(word1)
If i = 0 Then
Exit Function
findstr = ""
ElseIf i > Len(finds) Then
Exit Function
findstr = ""
End If
j = Len(word2)
If j = 0 Then
Exit Function
findstr = ""
ElseIf j > Len(finds) Then
Exit Function
findstr = ""
End If
Dim num1 As Long, num2 As Long
num1 = InStr(1, finds, word1)
If num1 = 0 Then
Exit Function
findstr = ""
End If
num2 = InStr(num1, finds, word2)
If num2 = 0 Then
Exit Function
findstr = ""
End If
Dim findlength As Long
findlength = num2 - num1 - Len(word1)
findstr = Mid(finds, num1 + Len(word1), findlength)
End Function
aaa="....</font>.......<font color=red>我要获取这段文字</font>...</font>.."如何获取<font color=red> 和 </font>中间这段中文?
中文字不是固定的, <font color=red> 和 </font>是固定不变的前后文中多次出现</font>的