[pmwiki-devel] php question--stripping out non letters...

Christophe David pmwiki at christophedavid.org
Mon May 14 23:53:56 CDT 2007


>
> I was wondering if there's an easy way to strip out all characters out
> of a string that are not letters or numbers?
>

preg_replace($pattern, $replacement, $string);


Try something like preg_replace('/[^a-zA-Z0-9]/', '', $string);


Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-devel/attachments/20070515/2fc8ef12/attachment.html 


More information about the pmwiki-devel mailing list