3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = 'Título ú Nota ó !¡ ! '; $text = preg_replace('/[\x{00ff}-\x{ffff}]/u', '*', $text); $text = preg_replace('/[^áéíóúña-zA-Z0-9\', ]/i','',$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.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Output for 4.3.0 - 4.3.2
<br /> <b>Warning</b>: Compilation failed: characters with values > 255 are not yet supported in classes at offset 17 in <b>/in/OGaGL</b> on line <b>4</b><br />