clean text string

hamid19395

New Member
I need to remove everything (parentheses, punctuation, etc), using PHP, from a text string and leave just text. Someone suggested this:\[code\]$str= trim(preg_replace('/\s*\([^)]*\)/', '', $str));\[/code\]Also, if there are words like: Bob's it needs to be cleaned to Bob. I also do not need any numbers, just words separated by commas.Any suggestions would be great!
 
Back
Top