RE: [PHP] Hi I get some problems while using eregi_replace

2003-06-09 Thread Boaz Yahav
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=FF]colored text[/color] to font
color=FFcolored text/font */ $message = eregi_replace
([color=(.*)](.*)[/color],font
color='\\1'\\2/font,$message);

/* transform [url=xxx]link![/url] to a href=xxxlink!/a */ $message
= eregi_replace ([url=(.*)](.*)[/url],A HREF=\\\1\
TARGET=\blank\\\2/A,$message);

/* transform [b]big text[/b] to bbig text/b */
$message = eregi_replace
(.*([b]).*([/b]).*,\\1b\\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



Re: [PHP] Hi I get some problems while using eregi_replace

2003-06-08 Thread poetbox
hi,php-generalwinst0n

 I'm from china,my English is not very good,too.
 Here's some example,perhaps it will help you a little.

 $post =str_replace([b],b,$post);
 $post =str_replace([/b],/b,$post);
 $post = eregi_replace(\\[hr=([^\\[]*)\\],hr width=\\1 align=left,$post);
 $post=eregi_replace(\\[swf\\](.+\.swf)\\[/swf\\],PARAM NAME=PLAY 
VALUE=TRUEPARAM NAME=LOOP VALUE=TRUEPARAM NAME=QUALITY VALUE=HIGHembed 
src=\\\1\ quality=high 
pluginspage=\http://www.macromedia.com/shockwave/download/indexcgi?P1_Prod_Version=ShockwaveFlash\;
 type=\application/x-shockwave-flash\
width=\580\ height=\400\/embed   a href=\\\1\ target=_blanknbsp 
/a,$post);






poetbox
[EMAIL PROTECTED]
2003-06-09




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