3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function clean($str){ $re = "/([0-9a-zA-Z]|\x{500}-\x{6FF}]{0,})/u"; preg_match_all($re, $str, $matches); return isset($matches[0]) ? implode($matches[0]) : ''; } echo clean('a|"bc!@Β£d艾β012艾e^&$ییییfg'); echo "\n"; echo "\n"; echo clean('$$$'); //echo abcd012eییییfg
based on RopAc
Output for 5.5.0 - 7.3.0beta1
abcd012efg