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); echo $text; $mystring = 'Título ú Nota ó !¡ ! )()&*%#$DR GT^(%(%(*&_{|}{jjkg cde d"'; $find = array ( '#[^a-z0-9\\s]#is', '#\\s#' ); $replace = array ( '', '_' ); $mystring = preg_replace ( $find, $replace, $mystring ); echo $mystring;
Output for 4.3.0 - 7.1.0
Ttulo Nota Ttulo__Nota_______DR_GTjjkg_cde_d