Articles
Regex to remove non ascii characters
- Details
- Published on Wednesday, 02 November 2011 20:49
Remove non ascii characters from a string with the following rgex
$new = preg_replace("/[^\x9\xA\xD\x20-\x7F]/", "", $old);
Remove non ascii characters from a string with the following rgex
$new = preg_replace("/[^\x9\xA\xD\x20-\x7F]/", "", $old);