Finding Links With Regex

Dec 15, 2011

I'm working on a program that gets some info about a certain web page. But one of the features is it needs to find all the links to other webpages on THE SAME site (I think its called an internal link... not sure). I already figured out how to get the page's HTML code, now i just need to know how to find stuff like "" in the HTML code then output me [URL]

View 4 Replies


ADVERTISEMENT

Finding Links In Html Source?

Oct 22, 2010

<div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:12px; background-image: initial; background-attachment: initial; background-origin:

initial; background-clip: initial; background-color: #ffffff; margin: 8px;" mce_style="color:
#000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-

[code].....

View 1 Replies

Using Regex Regular Expressions, Exclude Certain Things In Links?

Jun 15, 2012

Following on from a post I made earlier, I am making progress with what I require, but not knowing much about how RegEx expressions work, I'm stuck!

View 1 Replies

VS 2008 Regex - Parse Out Some Links Via Search And Fill A Text Box With Said Results

Mar 25, 2009

What I'm trying to do is parse out some links via a google search and fill a text box with said results. This is the code I have in a module which I call upon inside of a command button.

Imports System.Text
Imports System.Text.RegularExpressions

Module Module1

[CODE]...

View 8 Replies

RegEx - Finding / Returning A Code

Jul 10, 2009

I must admit it's been a few years since my RegEx class and since then, I have done little with them. So I turn to the brain power of SO. . . I have an Excel spreadsheet (2007) with some data. I want to search one of the columns for a pattern (here's the RegEx part). When I find a match I want to copy a portion of the found match to another column in the same row.

[Code]...

View 3 Replies

RegEx - Finding Pattern In String

Jul 22, 2009

I'm trying to find a pattern in a string, I guess is very easy but I'm terrible in regular expressions. I have a big text and I need to find all the next type of pattern:
{a|b|c}
That can be also something like this: {a|b|c|s|f|f|ft|r} or any number of items inside but at least 2 items so the pipe symbol is another key. Is this an easy regular expression? I'm using vb.net 2005.

View 4 Replies

RegEx, Finding And Replacing A Certain Substring?

Jan 27, 2009

I've got a string which could or could not contain the substring "/announce". I would like to replace this part of the string with "/scrape" if its found...so far nothing tricky. But heres the thing: I only want to replace it if the '/' in it is the last occurring in the string. Heres what I mean:

Heres a scenario where I want the replace to happen:

MyStringWithRandomText/announce?x=19
would become:
MyStringWithRandomText/scrape?x=19

And heres another scenario where the '/' in announce is not the last '/' occuring in the string, so I dont want to replace it:

MyStringWithRandomText/announce/foo?x=19

I hope that made sense. Not sure if there is a way to handle this by only using RegEx

View 2 Replies

Figure Out The RegEx Formula For Finding The Values Within The Tags Of HTML Mark-up?

Apr 4, 2011

I'm in need of some help trying to figure out the RegEx formula for finding the values within the tags of HTML mark-up like this:

<span class=""releaseYear"">1993</span>
<span class=""mpaa"">R</span>
<span class=""average-rating"">2.8</span>
<span class=""rt-fresh-small rt-fresh"" title=""Rotten Tomatoes score"">94%</span>

I only need 1993, R, 2.8 and 94% from that HTML above.

View 2 Replies

Regex - Adding "http://" To All Links Without A Protocol

Jan 25, 2011

I use VB.NET and would like to add http:// to all links that doesn't already start with http://, https://, ftp:// and so on. "I want to add http here <a href=""[URL]"" target=""_blank"">Google</a>, but not here <a href=""[URL]"" target=""_blank"">Google</a>."

It was easy when I just had the links, but I can't find a good solution for an entire string containing multiple links. I guess RegEx is the way to go, but I wouldn't even know where to start. EDIT: I can find the RegEx myself, it's the parsing and prepending I'm having problems with. Could anyone give me an example with Regex.Replace() in C# or VB.NET?

View 3 Replies

VB 2008 Extracting Links & Text - Links - Parsing Links & Text

Sep 12, 2009

I'm just curious as to how some software programs that I see out there have the ability to extract links & text from thousands of web pages at an extremely high and fast rate. Has anyone here, ever created a link or text extracting program the has the ability to parse many webpages and return data into a textbox? I know how to extract links via the webbrowser control, but it doesn't seem to parse/extract data at a very high & fast rate like many email, link & text extracting programs that I see out there.

[Code]...

View 6 Replies

WEBBROWSER LINKS - Store All Links Into A Collection

Sep 11, 2010

my webbrowser navigates to a webpage. I need to store all the links into a collection, I did find the code to do the job (on this forum) and it works, but there is a problem: there are more links on the page than those the code reads, like when i right click on a picture and choose "copy shortcut" I get a link that is not showing when I display the "view source" for the entire page. I can't figure out how to do it.

View 3 Replies

Concatenating A Variable With A Regex Group Match In Regex.replace?

Apr 5, 2012

I am having an issue where I am using regex.Replace to replace part of a string. The basic idea is that I want to capture the beginning of the string then replace the end of the string with a value from code. For an example pretend I have a string that says "Test Number " followed by number and I want to increment that number. I capture the "Test Number " but when I try to concatenate that capture with the new number it treats the capture ($1) as a literal and replaces the entire string with $1[new number].

[code]...

This will output "We are on Test Number 2", as expected. how I can use a variable in the replacement string portion of the Regex.Replace when including a captured group?

View 1 Replies

Regex: Take Text & Some Special Characters Between The Xml Tags Using Regex On C#.net?

Feb 23, 2012

I want to take the text and some special characters between the xml tags.. My input file contains:

[Code]...

now i want the Regex to take text and the special characters between the tags <line>,<inline>..

View 2 Replies

Increment Regex Match Using Regex.Replace

Jun 21, 2012

I'm creating a program in VB.NET to output multiple images. Some images will have the same file name. If there is multiple files with the same name I want to add "_1_" to the end of the file name. If the "_1_" file already exists I want to increment the 1 to be "_2_". If this file already exists I want to continue incrementing the number ultil it doesn't exist. So for example "filename", filename_1_", "filename_2_", etc. Here is the code that I have tried

[Code]...

View 1 Replies

Regex Builder That Actually BUILDS RegEx From A Highlight

Nov 17, 2011

I've been working straight since yesterday trying to get this to work. I'm a noob to RegEx and I've tested out about 5 different RegEx "builders" but each of them require you to navigate through the options to build the Regex...each of them has failed when I try to use them.Is there an application out there free/paid where you select the line you want to grab and the RegEx is auto generated from that highlight rather than having to try to build the line of code? [code]

View 1 Replies

.Net Routing For Links?

Dec 20, 2011

I am trying to work with routing on a site I am creating. If I have two routes, /Home/{Value1}/default.aspx for route 1 and /Users/{Value2}/default.aspx for route 2, how do I tell a link I am creating to use a specific route. I am trying to create links in my .vb code behind pages but I am unsure on how to tell it to use either route 1 or route 2 depending on my situation.

View 1 Replies

Add Links To Datagridview?

Aug 15, 2010

i hava a datagridwview with a datagridviewlinkcolumn and a split array with the links. How can I add this links from the array to the datagridviewlinkcolumn?

View 1 Replies

How To Extract Links

Apr 20, 2011

how can i extract some links Say i have some links in text box but 3 different types of hosts

[Code]...

View 8 Replies

Put Some Links In A Listbox?

Feb 6, 2012

Basically i need a code to put some links in a listbox, one after another. For example:

This is my table

ID-----URL--------
1 Google.com
2 Yahoo.com
and so on.

I have already opened a mysql connection, and i just need the code to put all the URLs in a listbox, one after another. I tried this: ListBox1.Items.Add("URL"), and obviousely didn't work.

View 7 Replies

Add Links To A Combo Box's Items?

Mar 29, 2009

How to add links to combo box's items...... Like when the form is loaded, the items are already there. If you select one it will take you to a website....And how do you make it so the items in the combo box are (PERMANENT) AND dont erase..

View 3 Replies

Asp.net - TreeView-Like List Of Links?

Feb 20, 2009

I have a have a table with Region_Name, Region_ID fields, and another one with Area_Name, Region_ID fields (each region have Areas that belongs to it).I want to display on my asp.net page a list of links (something that looks like a treeView) so when someone clicks on for ex The Bronx from Region New York in this list:

[Code]...

So, apart from the basics, i want to know how to populate the above list Automatically and make sure that the results are ALL Links, in other words, New York is a link, The Bronx is a link, and all the elements in the list are links that i will later attach a queryString to.

View 2 Replies

Click Multiple Links With Almost The Same Name?

Oct 23, 2011

I am creating a program for a company and what it does is the following:1. Opens web page and logs in automatically - (Done)2. User selects from 2 folders on the site - (Done)3.ser types in date - (Done)4. User sets default directory for download - (Done)5. User clicks a download button that does the following:5a. Takes date that was put into text box and searches for any related folders and opens that folder - (Done)5b. After folder is open, there is the possibility of being multiple zip files to be clicked and downloaded - (Not Done)My problem is in 5b. I cannot figure out how to select multiple items. I have tried using a wildcard but that doesn't seem to work. I tried setting loops for each link but it only opens that last link on the page

View 9 Replies

Click Multiple Links With The Same Name

Nov 24, 2010

I am creating a program for a company and what it does is the following:

1. Opens web page and logs in automatically - (Done)
2. User selects from 2 folders on the site - (Done)
3. User types in date - (Done)
4. User sets default directory for download - (Done)
5. User clicks a download button that does the following:

5a. Takes date that was put into text box and searches for any related folders and opens that folder - (Done) 5b. After folder is open, there is the possibility of being multiple zip files to be clicked and downloaded - (Not Done)

My problem is in 5b. I cannot figure out how to select multiple items. I have tried using a wildcard but that doesn't seem to work. I tried setting loops for each link but it only opens that last link on the page. The zip files to be downloaded are all named in the following manner - 11-22(1).ZIP, 11-22(2).ZIP etc. Also, zip extensions vary from ZIP to zip. Don't know if casing makes a difference. What I currently have the program do is to click each file and begin download. All it's doing is clicking the last file in the list. Whole website is basically a JavaScript applet. The only way to click a file is to search for the link name. [Code]

View 4 Replies

Create Expiring Links To S3?

Oct 22, 2009

Anyone have an example of creating a signed URL with an expiration using ASP .Net? I'm exploring using LitS3 or ThreeSharp in my project, and have not seen any specific methods to do this in either of those projects.

View 3 Replies

Create Links To Pdf Files?

May 23, 2012

I hope this post is in the correct forum. We have a folder on the server that has pdf files. The file names are in the format of 'report_name_propname_04_21_12.pdf'. The report_name is different as is the prop_name and 04 is the month, 21 is the day of month, and the 12 is the year. The goal is to have links on the web page that has the prop_name(s). When clicked it would display a list of months as links. ie 01,02,03,...11,12 under the propname link. When these month links are clicked the web page would display
a list of links of the pdf files. The part of displaying the pdf link I have. The question I have is how can this be achived in code? Is there a control for this functionality? I think it is like an Excel pivot table.

View 4 Replies

Get All Links From A Website Page?

Mar 14, 2010

I haven't coded vb in 4 months.. I never thought I would lose my experience that easily, anyways there's something I can't figure out.[code]...

View 4 Replies

Get Links On Webpage To Textbox?

Sep 18, 2010

There are placenames on this webpage and if you click on the placename it leads you to its profile. I need to get all the profile links into a textbox on my form. An example of the webpage [url]...

View 3 Replies

Getting HTML Data - How To Get The Links Name?

Apr 8, 2012

I have this code to take links from a page

CODE:

But how would i also get the links name?

View 14 Replies

Grab All Onclick Links?

Sep 7, 2011

I want to grab all the links inside the onclick.[code]...

View 5 Replies

How To Create Custom 'links'

Apr 12, 2012

I searched several keywords but could not find a good tutorial on how to create custom 'links'. My goal is for my apps to be able to handle special links inside of Outlook. The link will cause my app to display the proper info when it is clicked.

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved