<?php
$string = "Here! is some text, and numbers 12345, and symbols !£$%&";
$new_string = preg_replace("/[a-zA-Z0-9s]/", "", $string);
echo $new_string
?>
The code should return this:
Here is some text and numbers 12345 and symbols
One more thing. If you don't like to keep the blank white space in your text just reformat the preg_replace by removing the "s" whitespace character types. This is good for use with user names and passwords. The code would now look something like this:
Hereissometextandnumbers12345andsymbols