Try these : A function that parses a string and replaces http://whatever with a link, and email addresses with a mailto link. This function was designed for the motd package. But will work freely on its own. http://examples.weberdev.com/get_example.php3?count=1235
How to change all of the links in a string to be HTML links. http://examples.weberdev.com/get_example.php3?count=1567 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -----Original Message----- From: winst0n [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 5:23 AM To: php Subject: [PHP] Hi I get some problems while using eregi_replace Hi, so first of all, I'm sorry for my bad english. I'll try to write as better as I can, but I think it will be readable ;) So, this is 3 code unsing eregi_replace, but they dont work as well... If some one can give me a help, it's will be great. Many thx ! /******************** code ********************/ /* transform [color=FFFFFF]colored text[/color] to <font color="FFFFFF">colored text</font> */ $message = eregi_replace ("[color=(.*)](.*)[/color]","<font color='\\1'>\\2</font>",$message); /* transform [url=xxx]link![/url] to <a href="xxx">link!</a> */ $message = eregi_replace ("[url=(.*)](.*)[/url]","<A HREF=\"\\1\" TARGET=\"blank\">\\2</A>",$message); /* transform [b]big text[/b] to <b>big text</b> */ $message = eregi_replace (".*([b]).*([/b]).*","\\1<b>\\2</b>\\3",$message); -- 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

