Thanks for all your help with my URL code problem! I have come up with a solution that seems to half work and I can't figure out what I need to do to get it fully functional. Given my data string (text) from my database, this is what I do to replace the URL text with a functioning link. I am asking folks that, if they include a URL in their results to surround it by [] so that I can search for the brackets. This is what my text replace line looks like:
$data_str = eregi_replace ("(\[http://)([^]]*)", "<a href \"http=\\0\">\\0</a>", $data_str); So, if the URL is (for example) [http://www.cleanrun.com] (in plain text), it will show up for viewing in my browser as http://www.cleanrun.com but the URL associated with it will be that of the directory in the browser "Location" (i.e. http://wrong.url.com/Test_Results). I've tried all sorts of things with the call to eregi_replace but can't figure out what is going on. What the hec??? Can someone help? Many thanks!! Katherine Elliott -----Original Message----- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 2:05 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Adding HTTP URL Code On Thursday 09 January 2003 04:07, ELLIOTT,KATHERINE A (HP-FtCollins,ex1) wrote: > OK, so I've gotten NO responses to my query below so I > thought I'd ask for something slightly different and see what > I get. With regards to your original query, the answer is in the archives. Try searching for something like "regex url" or "regex hyperlink" etc. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* NOTICE: alloc: /dev/null: filesystem full */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php