rewriteTextLinks.php - make URLs in plain text clickable

From: Date: Mon, 22 Nov 2010 23:04:19 +0000
Subject: rewriteTextLinks.php - make URLs in plain text clickable
Groups: php.general 
Request: Send a blank email to php-general+get-309634@lists.php.net to get a copy of this message
I'm posting this in the hopes that it will be of some use to someone. I've put together a little regex function for finding and transforming links in blocks of plain text into clickable links while applying some heuristics to handle the more common edge cases. Unlike so many solutions I've found online this one handles more edge cases including periods and commas at the end, surrounding parentheses, trailing periods on only the domain part, etc. etc. http://formvista.com/fv-b-12-170/rewriteTextLinks-----a-function-to-make-links-in-blocks-of-text--quot-clickable-quot-.html ---------------------------------------------------------------
Yermo Lamers                                        DTLink, LLC
Software Developer                        http://www.dtlink.com
http://miles-by-motorcycle.com        For Motorcycle Travellers
http://formvista.com    Entrepreneurs CMS and Business Platform
---------------------------------------------------------------

« previous php.general (#309634) next »