Jump to content

automatically generate href or mailto from links


swamp

Recommended Posts

Hi, I have a page that reads from a mysql database, how on output can I make all links (in the format of www.website.com) turn into <a href="http://www.website.com">www.website.com</a> and all email links (in the format of [email protected]) turn into <a href="mailto:[email protected]">[email protected]</a>

use a regex pattern to find patterns that are  bblha@blah(dot)blah

 

the blahs can be the pattern of match any thing

 

 

and then u a replacement system to replace it with the tags added in

 

there are google things out there on this.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.