473,322 Members | 1,352 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

extract domain links matching

1
Ok the question is very simple if someone can help me to fix this problem.
I have created the program which is extracting doman names links from google but the problem with it that it can extract random domain names links.
I wanna to extract related domain links as i type from textbox1 and put them in listbox related domain names links.

Example:

This is what i want - freeware it extracts links as freeware but puts too and junk links as google,youtube and on.

So i want to make work as i type from keywords

example freeware and get all links with like this

More example:

www.freeware.com
www.freeware-home.com
www.freewarebest.com

like so i want to make my regex code to work if understand not put www.google.com or other links which is not relating from above.

and here is my a part of code regex

Expand|Select|Wrap|Line Numbers
  1. http://\b\w+\s*\b\.(net|com|us|org|ru|lt|co.uk|tr|info)|(ftp|telnet)\*$
what am i doing wrong can fix it ?

To understand what i mean to say.
Look at the picture iliustraisions.

This is that i want to remove



Leave only these matching found



And this is the code how to remove the dups junk links from the listbox but it doesn't work.
actually it remove but leaves google links and other which is not relating that one.



Expand|Select|Wrap|Line Numbers
  1. ListBox1.Sorted = True
  2.  
  3.         ListBox1.Refresh()
  4.         Dim index As Integer
  5.         Dim itemcount As Integer = ListBox1.Items.Count
  6.  
  7.         If itemcount > 1 Then
  8.             Dim lastitem As String = ListBox1.Items(itemcount - 1)
  9.  
  10.             For index = itemcount - 2 To 0 Step -1
  11.                 If ListBox1.Items(index) = lastitem Then
  12.                     ListBox1.Items.RemoveAt(index)
  13.                 Else
  14.                     lastitem = ListBox1.Items(index)
  15.                 End If
  16.             Next
  17.         End If
And here how i want to be extracted only related

http://freeware.acehtml.com
http://freeware.remakes.org
http://freeware.the-meiers.org
http://www.bullfreeware.com
http://www.burn4free.com
http://www.freemake.com
http://www.freeware-antivirus.com
http://www.freeware-downloads.com
http://www.freeware.ru
http://www.freeware4pc.com
http://www.freewarearena.com
http://www.freewarebb.com
http://www.freewaregenius.com
http://www.freewarekeylogger.org
http://www.freewarelovers.com
http://www.freewareosx.com
http://www.freewarepalm.com
http://www.freewareppc.com
http://www.freewareweb.com
http://www.newfreeware.com
http://www.pocketpcfreeware.com
http://www.portablefreeware.com
Feb 19 '12 #1
0 1680

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Shabam | last post by:
How do you fetch just the domain name part of a variable in a script? The variable can be "http://www.domain.com/blahblah/whatever/page.htm" or "http://sub.domain.com/blahblah/whatever/page.htm"....
1
by: John Seeliger | last post by:
I am pretty new to VB, so please forgive the simplistic question. This is using VB .NET Standard 2003. My form has three objects on it: a TextBox named URL, a Button named Extract and a...
15
by: Roedy Green | last post by:
I seem to recall reading about a feature so that you could apply different styles to different kinds of link. e.g. local and offsite or to automatically put a logo beside some domain links. I...
9
by: chrisspencer02 | last post by:
I am looking for a method to extract the links embedded within the Javascript in a web page: an ActiveX component, or example code in C++/Pascal/etc. I am looking for a general solution, not one...
1
by: roberto321 | last post by:
Hi Guys, I was wondering if someone could help me out with the following requirements <mydocument> <div id="other"> <a href="linkother">linkother</a> </div> <div id="hello">
3
by: deko | last post by:
I'm sure someone has passed this way before... I want to check to see is a domain name is contained in a string, and if one is, I want to extract it. In these strings, domains are always...
7
by: rshepard | last post by:
I'm not sure how to change a string so that it matches another one. My application (using wxPython and SQLite3 via pysqlite2) needs to compare a string selected from the database into a list of...
2
by: learnyourabc | last post by:
For a webcrawler, you need to extract all links from the web page. For normal html anchor tags or any of the src and href attribute on the tag can be easily extracted using ihtmldocument. What...
3
by: Howard Rice | last post by:
Access 2000 (9.0.3821 SR-1) / Windows XP Pro Hi All, Apologies for the newbie question. I am trying to use a simple Query to put a list of e-mail addresses in domain name order (ascending...
2
by: HTCAthenaGuy | last post by:
Hey ive got a simple problem here im using Forum.Document.Links to extract all links from a webpage loaded into a webbrowser control . Some of the links contain url variables like the subscribe...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.