Today I have a big problem and I have been looking at many different methods over a few hours and none of them are working for me.
I have tried
- Get Between Functions
- Regex
- HTML Agility Pack
The problem is in VB.NET and I want to grab out the title of a film and ignore the html link before it. But the problem is I cant because the link changes for every title, and I do not understand Regex to create the code for it.
Here is the code and the part which says Movie Link 1 is what I want to grab.
<a href="/download/fast-and-furious-7-2015-hd-ts-xvid-ac3-hq-hive-cm8-t10472303.html" class="cellMainLink">**Movie Link 1**</a>
and of course there is other titles I need to grab too. So the code I got for it is this and it is not working.
Dim r As New System.Text.RegularExpressions.Regex("class=""cellMainLink"">(?<name>.*)</a>")
Dim matches As MatchCollection = r.Matches(rssourcecode)
For Each itemcode As Match In matches
ListBox1.Items.Add(itemcode.Groups(2).Value)
Next
To anyone who can help me please get back to me as soon as possible.
Thank you.