note 11630 deleted from function.ereg-replace by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:56:02 +0000 |
| Subject: | note 11630 deleted from function.ereg-replace by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20205@lists.php.net to get a copy of this message | ||
the above mentioned
<pre>
$str = eregi_replace("[[:space:]]+", " ", $str);
</pre>
has a typo the correct spelling is
<pre>
$str = eregi_replace("[[:space:]]+", "", $str);
</pre>
"" instead of " " (else you would replace a space with a whitspace).
By the way the same error ocurs in the perl expression
<pre>
$str =~ s/\s+/ /g;
</pre>
correct:
<pre>
$str =~ s/\s+//g;
</pre>