PREG_REPLACE 中这个 EREG_REPLACE 函数的等价物是什么?
$html = ereg_replace("[^A-Za-z._0-9@ ]"," ",$html);
PREG_REPLACE 中这个 EREG_REPLACE 函数的等价物是什么?
$html = ereg_replace("[^A-Za-z._0-9@ ]"," ",$html);
$html = preg_replace("/[^A-Za-z._0-9@ ]/"," ",$html);
最大的区别是末端的分隔符,尽管还有其他分隔符。在这里阅读。
$html = preg_replace("/[^A-Za-z._0-9@ ]/"," ",$html);