tags:

views:

96

answers:

3

i need to download page from source code..for example

<span id="businessNumOnMap" class="resultNumberOnMap" style="display:none;"></span><span><a href="/len/aapproximatch%20search/285295.php" onclick="loadBusinessInfo('0', '285295'); return false;" class="businessName">Cellini's Italian Restaurant</a>

i want to download the "/len/aaproximat...php"..i didnt find the suitable regex for it..and i need to download that page..can anyone help?

im using vb.net

+3  A: 

Normally it's not recommended to parse HTML with a regex, with the exception if this is a simple page that you know the format of, the Html Agility Pack is often recommended for this purpose instead.

Be aware though, if you're parsing this from a page that's on the internet, the site in question might have T&Cs for the usage of their data that you might need to follow to stay legal.

ho1
+2  A: 

Do you want to download the php file itself with all the codes and not the only html codes? If it's in that case it's not possible

Wai Wong
i want to download just the php file..do u have any suggestion?its in <a href="/len/aapproximatch%20search/405195.php"onclick="loadBusinessInfo('4', '405195')>i just to download the /len/aapproximatch%20search/405195.php
newBie
+1  A: 

Use WebClient.DownloadString method for downloading. If you haven't found a suitable expression to extract that "Span" from the source, then build you own.

Sphynx