Wednesday, April 10, 2013

Using the GetBetween() Function


For this tutorial I will show you how to use the GetBetween() function to grab specific data between tags from a particular source.

You can do this easily by inputting this code...

Dim data As String = GetBetween(sourcecode, "<h3>", "</h3>") 'Set the tags you want to use
Dim datastringbefore() As String = Split(data, " ") 'We want to split the data where there is a space
Dim firstname As String = datastringbefore(0) 'This will get the first data item from the string

If we chose datastringbefore(2), it would select the text after the space.

No comments:

Post a Comment