Re: FN-FORUM: preg replace quickie
date posted 16th September 2005 13:57
On Fri, Sep 16, 2005 at 01:39:15PM -0000, Stephen Willcock wrote:
>
> I'm no regexp expert but I think this should do it:
>
> $s = preg_replace('/[^a-zA-Z0-9]/',' ',$s);
Need a 'g' after the second '/' else it will only replace the first one.
--
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