Nasıl bu desen tire izin verebilir?
$str = preg_replace ( "/[^a-z \d]/i", "", $str ) ;
İlk koy.
$str = preg_replace ( "/[^-a-z \d]/i", "", $str ) ;