On Sunday 25 July 2004 13:14, Wudi wrote:

Please do not top post.

> This script can replace links:
>     $text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a
> href=\"\\0\">\\0</a>", $text); But it cannot get the links.

I repeat:

> > Hmmm it needs to be able to *find* the links before it can replace them.
> > Just borrow the code that finds the links.

The "get" links part, the bit which you're interested in, is the regex. So 
just plug the regex into ereg() or for this application eregi() may be more 
useful.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Hurewitz's Memory Principle:
        The chance of forgetting something is directly proportional
        to... to... uh.....
*/

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

Reply via email to