Converting solution from PHP to VB.NET

  • Thread starter Thread starter Martin Ho
  • Start date Start date
M

Martin Ho

In PHP is one function for extracting urls from the page, I would love
to convert to VB.NET.

This is how it looks in php:

preg_match_all("{
\b
$urls :
[$any] +?


(?=
[$punc] *
[^$any]
|
$
)
}x", $html,
$matches);


I will need someone who could also explain how to extract part of the
website between some specific tags, using this kind of function in
vb.net.


Thanks for all your help.
Sincerely,
Martin
 
Martin,
I cannot read PHP, so I'm not sure of what your function is really doing...

Have you look at using a System.Text.RegularExpression.RegEx to extract urls
from a page?

The following example searches an input string (a page for example) and
prints out all the href values...

http://msdn.microsoft.com/library/d...cpguide/html/cpconexamplescanningforhrefs.asp

Hope this helps
Jay

Martin Ho said:
In PHP is one function for extracting urls from the page, I would love
to convert to VB.NET.

This is how it looks in php:

preg_match_all("{
\b
$urls :
[$any] +?


(?=
[$punc] *
[^$any]
|
$
)
}x", $html,
$matches);


I will need someone who could also explain how to extract part of the
website between some specific tags, using this kind of function in
vb.net.


Thanks for all your help.
Sincerely,
Martin



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
* (e-mail address removed)-spam.invalid (Martin Ho) scripsit:
In PHP is one function for extracting urls from the page, I would love
to convert to VB.NET.

Have a look at the chapters about "Regular Expressions" in the .NET
documentation (class 'System.Text.RegularExpressions.Regex').
 
Hi Martin,

I cannot read PHP either,

But it looks like a normal url extraction from the data in the Get.

You can look to the regex,

But I use for that something as

Dim Mydatastring = MyUrl.substring(myUrl.indexoff("?")+1)
Or
Mydatastringar () = split.MyUrl("?)
Mydatastring = Mydatastringar(1)

I hope this helps,

Cor


Martin Ho said:
In PHP is one function for extracting urls from the page, I would love
to convert to VB.NET.

This is how it looks in php:

preg_match_all("{
\b
$urls :
[$any] +?


(?=
[$punc] *
[^$any]
|
$
)
}x", $html,
$matches);


I will need someone who could also explain how to extract part of the
website between some specific tags, using this kind of function in
vb.net.


Thanks for all your help.
Sincerely,
Martin



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
Back
Top