[ciapug] preg_replace question.
Jerry Weida
ciapug@cialug.org
Tue, 7 Sep 2004 13:30:22 -0500
The \s should works just fine on my PHP5 installation and my PHP4.3.1
installation. You could try the long-hand version '\b\t\\n\r'.
Have you installed any updates or anything, in particular the PCRE libraries?
On Tue, 07 Sep 2004 13:17:32 -0500, Chris Hettinger <cjh@raccoon.com> wrote:
> I had this working at one point, but now it's not... not sure what's
> changed.
>
> $string = '123 45 6789'
>
> // Should remove 'any whitespace' character
> $string2 = preg_replace("/\s/", "", $string);
>
> echo $string2
> // Should be 123456789.
> // Im getting 123 45 6789
>
> However, recently, this is NOT doing anything. Did I mess up the syntax?
>
> -ch
>
> _______________________________________________
> ciapug mailing list
> ciapug@cialug.org
> http://cialug.org/mailman/listinfo/ciapug
>