Skip to content

A Regex pattern for somewhat reliably detecting URLs in a blog of human-entered text

Notifications You must be signed in to change notification settings

chadmyers/UrlRegex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

UrlRegex

UrlRegex is a regex pattern designed originally by John Gruber for detecting URLs that occur among a blog of wild and crazy human-entered text.

It's not perfect, but the intent is to handle most common and uncommon scenarios.

Getting Started

Just clone the source and open the start.html in your favorite browser to see the Regex in action.

Credits

John Gruber is the originator of this regex. You can read his blog post for more background on how he developed it.

According to his blog post, he has released his original regex as public domain.

This project is also released as public domain, as-is, no warranties implied or expressed, etc. None of the commiters of this project are responsible for any harm (real or imagined) that may occur from the use of this pattern, code, or anything in this respository.

You may use this pattern and all code in this repository for all purposes except committing evil (crimes, harm, etc). You do not have to attribute your usage to anyone, though we think that you should probably give John Gruber a credit for his work in this area. At the least, send him an email or do a blog post and give him some link love.

About

A Regex pattern for somewhat reliably detecting URLs in a blog of human-entered text

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages