Regex keep only alphanumeric characters with unicode support

echo preg_replace("/[\W]/u", "", $str);

Leave a Reply