Function strCut(strContent, StrStart, StrEnd) As String '通用截取函數(shù) Dim strHtml, S1, S2 As String strHtml = strContent On Error Resume Next S1 = InStr(strHtml, StrStart) + Len(StrStart) S2 = InStr(S1, strHtml, StrEnd) strCut = Mid(strHtml, S1, S2 - S1) End Function Private Sub Form_Load() Dim hunzi1, hunzi2 As String hunzi1 = "<html><title>this is title</title></html>" hunzi2 = strCut(hunzi1, "<title>", "</title>") MsgBox hunzi2 End Sub |
|