Last updated on November 17th, 2015 at 05:09 am
Non-Alpha numeric characters are any which is not A-Z,a-z or 0-9
A classic example of Non-Alphanumeric characters are !”Â£$%^&*(), Here we will see how to remove Non-Alphanumeric characters using php.
< ?php $str = "Here! are some numbers 1244 and some non alphanumeric characters !Â£$%^&"; $new_string = preg_replace("/[^a-zA-Z0-9\s]/", "", $str); echo $new_string; ?>
This is a very simple script which remove ! and other characters from the string !Â£$%^&