473,772 Members | 3,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

extract domain links matching

1 New Member
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 1693

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

Similar topics

2
7410
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". What I need is to extract just the "domain.com".
1
1539
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 WebBrowser named AxWebBrowser1. The goal is to have the user enter a URL in the TextBox and then hit the Extract button and then to get the links from the web page they entered. So far I have:
15
2135
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 would like to add an icon to pdf links. I'm after something of the form a:link("*.pdf) { properties ... }
9
3502
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 tailored to a particular page/script. Hopefully, the problem can be solved without recreating a complete Javascript interpreter. Any ideas?
1
1436
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
18381
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 preceded by "http://" or "http : //www" (without the spaces). in pseudo code, I thought it might look like this: if (eregi("http: //", $mystring)) {
7
1730
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 tuples with another string selected in a display widget. An extract of the relevant code is: selName = self.polTree.GetItemText(selID) ...
2
13267
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 about links inside of javascript function like below?? <HEAD> <SCRIPT language="JavaScript"> <!--hide function newwindow()
3
4718
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 alphabetically) but cannot find a way of extracting only the domain information after the @ character in the complete address string. Of course, the addresses in the source table are of different lengths and so the position of the @ character varies. ...
2
2498
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 link above http://bytes.com/subscription.php?do=viewsubscription . Each one of these links getspassed through a foreachloop . I use String.Contains() to filter out all links that dont contain ?do= the url paremer in this case but after that im...
0
9620
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10104
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.