Regexp: Remove no alnum chars from a string
- by poru
Hello,
how could I remove all charakters from a string that aren't a-z/A-Z and 0-9 and _ with PHP?
I tried that but it has no effect, it returns the same string back:
preg_replace('[^a-zA-Z0-9_]', '', 'Testdo123_-:=)§%&');