snip snip...

// email addresses
message = rereplace(message,"([[:space:]])(([[:alnum:]][-a-zA-Z0-9_%\.']*)?[[:alnum:[EMAIL PROTECTED]:alnum:]][-a-zA-Z0-9%\>.]*\.[[:alpha:]]{2,})([[:space:]])","\1<a href=""mailto:\2"";>\2</a>\4","ALL");



// web sites (let's not bother with other URLs)
message = rereplace(message,"([[:space:]])(http[s]*://([[:alnum:]][-a-zA-Z0-9.]*)?[[:alpha:]]{2,}[^[:space:]]*)([[:space:]])","\1<a href=""\2"" target=""_blank"">\2</a>\4","ALL");




At 16:45 12/03/2004, you wrote:
Anyone got a CFX or CFML that takes a string and returns it with e-mail
address and URLs wrapped in <a> tags?

Had a shufty on the Exchange but it's needle in a haystack (must be
searching on the wrong terms).


Ta


--
Aidan Whitehall <mailto:[EMAIL PROTECTED]>
Macromedia ColdFusion Developer
Fairbanks Environmental Ltd  +44 (0)1695 51775
Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards>

Fairbanks uses anti-spam filtering. If you sent an e-mail and expected
to receive a response but didn't, please call -- it may be that your
e-mail didn't make it to the intended mailbox.

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--
These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/


CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*


To unsubscribe, e-mail: [EMAIL PROTECTED]


--
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
     *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
          *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]



Reply via email to