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 Pattern Title
Expression
\b((?#optional port)(https?|ftp|file)://)? (?#sub domain)([a-z0-9](?:[-a-z0-9]*[a-z0-9])?\.)+ (?#top domain)(com\b|edu\b|biz\b|gov\b|in(?:t|fo)\b|mil\b|net\b|org\b|[a-z][a-z]\b) (?#optional port)(:\d+)? (?#optional path)(/[-a-z0-9_:\@&?=+,.!/~*'%\$]*)* (?#not ending in)(?<![.,?!]) (?#not enclosed in)(?!((?!(?:<a )).)*?(?:</a>)) (?#or enclosed in)(?!((?!(?:<!--)).)*?(?:-->))
Description
Yet Another URL Search. Useful for capturing URLs in raw text. Ignores URLs in HREF and comments. Turn off whitespacing to test!
Matches
http://www.google.com | google.com | http://some-domain.net/very/long/path/123.html
Non-Matches
subdomain.NonExistentTopDomain | <a href="http://www.google.com">www.google.com</
Author Rating: Not yet rated. Simon Ferguson
   Displaying page 1 of 1 pages; Items 1 to 1

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