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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Easiest URL Link
Expression
(http://|https://)([a-zA-Z0-9]+\.[a-zA-Z0-9\-]+|[a-zA-Z0-9\-]+)\.[a-zA-Z\.]{2,6}(/[a-zA-Z0-9\.\?=/#%&\+-]+|/|)
Description
As always, I couldn't find a regex that worked for me. It only covers full urls with http:// and https://, obviously if you want to add ftp:// then change the first part to: (http://|https://|ftp://) etc..., you get my drift. If you want to cover everything, like short urls, try this site: http://internet.ls-la.net/folklore/url-regexpr.html
Matches
http://www.url.com, http://www.url.com.au, http://www.url.co.nz, http://www.url123.com, http://www.url-123.com, http://www.url.com/, http://www.url.com/page.html, http://www.url.com/page.asp?id=you123&num=%60&pass=big-long+password#anchor
Non-Matches
http://www.url.1com, http://www.url.com.1au
Author Rating: Not yet rated. Oz
   Displaying page 1 of 1 pages; Items 1 to 1

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