Christophe David wrote:
> 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);|
>
or something like:
preg_replace('/W+/','',$string)
if you also want to strip underscores:
preg_replace('/[W_]+/','',$string)
_______________________________________________
pmwiki-devel mailing list
pmwiki-devel pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel
|