How can I remove everything from a string apart from letters? I have an input field for first names.
In PHP, you can use (as suggested by @rczajka and @mario):
preg_replace('/PL/u', '', $str)
Working Example: http://codepad.viper-7.com/V78skl
You may want to checkout this Tutorial for regex
2.1m questions
2.1m answers
60 comments
57.0k users