regex - Php parse links/emails -


I am thinking that there is a simple snippet that changes any type of link:

  from http://www.cnn.com & lt; A href = "http://www.cnn.com" & gt; Http: //www.cnn.com< / A & gt; From Cnn.com & lt; A href = "http://www.cnn.com" & gt; Cnn.com & lt; / A & gt; From www..cnn.com & lt; A href = "http://www.cnn.com" & gt; Www.cnn.com & lt; / A & gt; From abc@def.com & lt; A href = "mailto: mailto: abc@def.com" & gt; Mail: ABC @ def.com & lt; / A & gt;  

I do not want to use any PHP5 specific library.

Thank you for your time.

UPDATE I want to change the above text to change it. Please note that the href tags and text for episode 2 and 3 are different.

UPDATE2 How does Gmail chat? She is pretty smart and works only for real domain names. Like A.ly works but CCB does not work.

Yes,

   

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -