Function UKTV()
Const Separator = " "
Const Path = "UK_TV.txt"
set http = createobject("microsoft.xmlhttp")
Http.open "GET","http://www.teletext.co.uk/tvplus/nownext.asp?High=3", false
Http.send
strng = Http.responsetext
Dim regEx
Set regEx = New RegExp
regEx.Global = True
regEx.Pattern = "<TD WIDTH=75><FONT SIZE=""-2""><A HREF="".*?"" style="".*?"">(.*?)</a> </FONT></TD>" & _
"\s+<TD WIDTH=35><.*?>(.*?) </FONT></TD>" & _
"\s+<TD WIDTH=150><.*?>(.*?) </FONT></TD>" & _
"\s+<TD WIDTH=35><.*?>(.*?) </FONT></TD>" & _
"\s+<TD WIDTH=155><.*?>(.*?) </FONT></TD>" & _
"\s+</TR>"
Set Matches = regEx.Execute(strng)
Set fs = CreateObject("Scripting.FileSystemObject")
Set outFile = fs.CreateTextFile(Path, True)
For Each Match in Matches
outfile.write match.SubMatches(0) & VbNewLine & match.SubMatches(1) & Separator & match.SubMatches(2) & VbNewLine & match.SubMatches(3) & Separator & match.SubMatches(4)
outFile.WriteLine
Next
outFile.close
End Function