Posted By

fugue on 12/29/06


Tagged

regex


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vali29


Replace URL with link


 / Published in: PHP
 

  1. $text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $text);

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: tannerc on January 18, 2010

With ereg_replace being unsupported by future versions of PHP, is there another way to do this as effectively?

Posted By: CraigFoot on February 21, 2010

preg_replace?

Posted By: accsk on January 21, 2011

Ah !Thank you for sharing。Look forward to your articles. I will follow you

Posted By: carlalee on June 23, 2011

Here we have our stunning Glashutte PanoReserve Replica for your perusal. Our timepieces are brimming with just as much grace, elegance and beauty as authentic ones, only with a price that your bank account will actually thank you for! These attractive Glashutte PanoRetroGraph Replica in men’s, ladies, and unisex sizes will be the crowning touch to any outfit, any occasion, and any season. Our Glashutte Senator Replica are only the very best quality, as we test each one before shipping and get our merchandise only from the best suppliers. As we are in the watch business, we know how important time is to you. Thus, we offer the fastest shipping around not to mention a reply to any inquiries within three hours of receipt! With our high quality Glashutte Sport Evolution Replica and super-low prices, you won’t find a better place to shop.

You need to login to post a comment.