Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a title="" href="/player-profiles/ashley-barnes/" data-hasqtip="19" oldtitle="Ashley Barnes">Barnes (Ashley)</a>
- Public Sub parsehtml()
- Set html = CreateObject("HTMLFile")
- html.body.innerHTML = "<a title="""" href=""/player-profiles/ashley-barnes/"" data-hasqtip=""19"" oldtitle=""Ashley Barnes"">Barnes (Ashley)</a>"
- MsgBox html.getElementsByTagName("a")(0).innerText 'Barnes (Ashley)
- End Sub
- Sub ShowMe()
- Dim html As String
- html = "<a title="""" href=""/player-profiles/ashley-barnes/"" data-hasqtip=""19"" oldtitle=""Ashley Barnes"">Barnes (Ashley)</a>"
- Dim pos1 As Long
- Dim pos2 As Long
- Dim nameOnly As String
- pos1 = InStrRev(html, "</a>")
- pos2 = InStrRev(html, ">", pos1) + 1
- nameOnly = Mid$(html, pos2, pos1 - pos2)
- Debug.Print nameOnly
- End Sub
- Public Function KillJunk(S As String) As String
- Dim L As Long, s2 As String, CH As String
- Dim Ignore As Boolean, i As Long
- Ignore = False
- L = Len(S)
- For i = 1 To L
- CH = Mid(S, i, 1)
- If CH = "<" Then
- Ignore = True
- End If
- If Ignore Then
- If CH = ">" Then
- Ignore = False
- End If
- Else
- s2 = s2 & CH
- End If
- Next i
- KillJunk = s2
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement