3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = 'Título ú Nota ó !¡ ! '; $text = preg_replace('/[\x{007f}-\x{009f}]/u', '*', $text); $text = preg_replace('/[^áéíóúña-zA-Z0-9\', ]/i','',$text); echo $text; die; echo preg_replace('/[\x{00ff}-\x{ffff}]/u', '*', $text); echo $text; $mystring = 'Título ú Nota ó !¡ ! áéíóúñ )()&*%#$DR GT^(%(%(*&_{|}{jjkg cde d"'; $find = array ( '#[^a-z0-99áéíóúñ\\s]#is', '#\\s#' ); $replace = array ( '', ' ' ); $mystring = preg_replace ( $find, $replace, $mystring ); echo $mystring;
Output for 4.3.0 - 7.1.0
Título ú Nota ó �