Re: FN-FORUM: preg replace quickie
date posted 16th September 2005 13:48
On Fri, Sep 16, 2005 at 01:28:20PM -0000, Alex Beston wrote:
>
> hi FN
>
> I have a search string and i want to remove anything that isnt a - z
> or A - Z or 0 - 9 replacing with a space character
>
> (using php preg_replace, presumably)
>
> how do i do this?
preg_replace("/[^a-zA-Z0-9]/g", " ", $string)
--
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
#include