[PHP] Manage link.

2003-12-18 Thread Vincent M.
Hello,

Is there any way to manage links in an array and transform them.
For example, I have this text in the database:
---
Software  Support Media, produc-ers of the International PHP 
Conference, are pleased to announce a new monthly version of their print 
publication. For more information, you can go here: http://www.google.com
Thanks.
---

And transform this text to:
---
Software  Support Media, producers of the International PHP Conference, 
are pleased to announce a new monthly version of their print 
publication. For more information, you can go here: a 
href=\http://www.google.com\;url/a
Thanks.
--

Thanks,
Vincent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Manage link.

2003-12-18 Thread Evan Nemerson
On Thursday 18 December 2003 01:37 pm, Vincent M. wrote:
 Hello,

 Is there any way to manage links in an array and transform them.
 For example, I have this text in the database:

php.net/preg_replace

 ---
 Software  Support Media, produc-ers of the International PHP
 Conference, are pleased to announce a new monthly version of their print
 publication. For more information, you can go here: http://www.google.com
 Thanks.
 ---

 And transform this text to:
 ---
 Software  Support Media, producers of the International PHP Conference,
 are pleased to announce a new monthly version of their print
 publication. For more information, you can go here: a
 href=\http://www.google.com\;url/a
 Thanks.
 --


 Thanks,
 Vincent.

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
Perl - the only language that looks the same before and after RSA 
encryption.

-Keith Bostic

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Manage link.

2003-12-18 Thread Vincent M.
This one is perfect:
$text = preg_replace( /(?!a 
href=\)((http|ftp)+(s)?:\/\/[^\s]+)/i, a 
style=\text-decoration:underline\ href=\\\0\URL/a, $text );

:D

Evan Nemerson wrote:

On Thursday 18 December 2003 01:37 pm, Vincent M. wrote:

Hello,

Is there any way to manage links in an array and transform them.
For example, I have this text in the database:


php.net/preg_replace

---
Software  Support Media, produc-ers of the International PHP
Conference, are pleased to announce a new monthly version of their print
publication. For more information, you can go here: http://www.google.com
Thanks.
---
And transform this text to:
---
Software  Support Media, producers of the International PHP Conference,
are pleased to announce a new monthly version of their print
publication. For more information, you can go here: a
href=\http://www.google.com\;url/a
Thanks.
--
Thanks,
Vincent.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php