Re: ereg_replace for whitespace?
| From: | Hans H. Anderson | Date: | Tue, 22 Aug 2000 00:07:12 +0000 |
| Subject: | Re: ereg_replace for whitespace? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12854@lists.php.net to get a copy of this message | ||
On Mon, 21 Aug 2000, jeremy brand wrote:
> Unless I'm wrong, it is because you are using " (double quotes) and I
> used ' (single quotes).
>
> ereg_replace('\ +', ' ', $userd[fname]);
>
> is not the same thing as
>
> ereg_replace(' +', ' ', $userd[fname]);
I tried it and got the same result using ' with the slash and ' w/o
the slash. No biggy, I just like to know if there is a more efficient
regex, being that they are not the most efficient code, so I thought I'd
ask.
Hans Anderson ~ me@hansanderson.com
PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL
(800)397-9116 / (406)549-6524 | Databases, Flash Multimedia,
http://www.hansanderson.com | Killer Audio Production,
http://www.goofiness.com | Minty Fresh Breath.