3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = 'Título ú Nota ó !¡ ! '; $text = preg_replace('/[^áéíóúña-zA-Z0-9\', ]/i','',$text); $text = preg_replace('/[\x{007f}-\x{ffff}]/u', '*', $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 5.2.0 - 7.1.0
Output for 4.3.5 - 5.1.6
Título ú Nota ó �
Output for 4.3.3 - 4.3.4
T*tulo * Nota * �
Output for 4.3.0 - 4.3.2
Warning: Compilation failed: characters with values > 255 are not yet supported in classes at offset 17 in /in/gQurJ on line 6