RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(("|')[a-z0-9\/\.\?\=\&]*(\.htm|\.asp|\.php|\.jsp)[a-z0-9\/\.\?\=\&]*("|'))|(href=*?[a-z0-9\/\.\?\=\&"']*)
Description
Will locate an URL in a webpage. It'll search in 2 ways - first it will try to locate a href=, and then go to the end of the link. If there is nu href=, it will search for the end of the file instead (.asp, .htm and so on), and then take the data between the "xxxxxx" or 'xxxxxx'
Matches
href="produktsida.asp?kategori2=218" | href="NuclearTesting.htm"
Non-Matches
U Suck
Author Rating: Not yet rated. Henric Rosvall
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Mr.
Name: John Jonas
Date: 3/12/2004 1:49:51 PM
Comment:
Works great. I'm writing a site map creator in php (because I haven't been able to find another one) and this regex did exactly what I wanted. Thanks.


Copyright © 2001-2017, RegexAdvice.com | ASP.NET Tutorials