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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find URL,Website,Weburl
Expression
(http://([\w-]+\.)|([\w-]+\.))+[\w-]*(/[\w- ./?%=]*)?
Description
Regular Expression matches any internet URLs. Used with the replace method it comes in very handy.
Matches
http://www.mk.com,www.mk.com,www.mk.com/default.aspx,http://www.mk.com/default.aspx
Non-Matches
.com,wwww,1234
Author Rating: The rating for this expression. Muthukrishnan
Source Own
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: URL,Website,Weburl
Name: G Franks
Date: 11/25/2008 12:15:15 PM
Comment:
I've found that using this expression in BBEdit to find and replace using grep, it works great replacing prefixed urls and just www, but it also replaces abbreviations that have a period. For example, A. B. C. Dept. Inc. all would be replaced by the chosen url.


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