- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
Whilst writing a plain-text to HTML function, I ran into the problem of links that users had written with <a> tags (as opposed to just writing the URL) were linking improperly. This regular expression returns many types of URL, and preceding characters, if any. This allows you to handle each type of match appropriately
href='' | |
Non-Matches | |
Author Rating: Not yet rated. Demo Gorgon
Source The concept of (ht|f)tp(s?) came from, I believe, TwoGuysFromRolla. The rest is yours truly.
Your Rating
Bad Good

Enter New 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: AAA
Name: UUU
Date: 6/17/2016 11:35:09 PM
1- 2- 3- 4- 5-

Title: Works
Name: Vu Quang Thang
Date: 2/26/2012 3:26:17 AM
I tried it with PHP and it works perfectly. Thank you so much.

Copyright © 2001-2019, | ASP.NET Tutorials