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 Url Pattern
Expression
^((f|ht)tp(s)?)\://([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.[a-zA-Z]{2,6}((/|\?)[a-zA-Z0-9\.\?=/#%&\+-]+|/|)$
Description
Pattern test for general validity of a Url. It is a little stricter than many others here, as I found they often passed obviously invalid strings like 'http://foo', but is still fairly concise.
Matches
http://foo.com http://www.foo.bar.com https://foo.com?id=123
Non-Matches
http://foo http://foo..bar
Author Rating: Not yet rated. Dan Billingsley
   Displaying page 1 of 1 pages; Items 1 to 1

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