Converting solution from PHP to VB.NET

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
 
J

Jay B. Harlow [MVP - Outlook]

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
=---
 
H

Herfried K. Wagner [MVP]

* (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').
 
C

Cor

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
=---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top