Inane ereg_replace question
| From: | rm | Date: | Sat, 03 Mar 2001 18:12:41 +0000 |
| Subject: | Inane ereg_replace question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42460@lists.php.net to get a copy of this message | ||
I have to get rid of any spaces on either side of the
: mark. Can anyone explain why
php 3.xx
$a="to be or not : to to be";
$b=ereg_replace(" *:",":",$b);
$b=ereg_replace(": *",":",$b);
works and
$b=ereg_replace(" *:|: *",":",$b);
does not work. I've had this problem before and ended
up using two or more statments rather than one.
rm
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/