Update ajax.php

Use preg_match instead of str_replace (deprecated)