ereg_replace( ) problem ! please help!
| From: | phpman | Date: | Wed, 23 Apr 2003 02:49:41 +0000 |
| Subject: | ereg_replace( ) problem ! please help! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145122@lists.php.net to get a copy of this message | ||
Dear all,
I use SquirrelMail in my Redhat linux computer (kernal 2.4.0-0.99.11,
php rpm php-4.1.2-7.0.6 and apache rpm apache-1.3.27-1.7.1)
And I find there is a problem in function call ereg_replace( ) , and i
have write a little php program to test that :
My test.php program :-
<?PHP
$str = 'test@test.com';
$string1 = '';
$string1 = ereg_replace('(["\\])', '\\\\1', $str);
echo ($string1);
?>
The result is :-
\\1t\\1e\\1s\\1t\\1@\\1t\\1e\\1s\\1t\\1.\\1c\\1o\\1m\\1
the above result is not my want , I don't why this happen.
Anyone can help?
is that a php's bug? or CHARSET problem?
Thanks All!