PREG_REPLACE中此EREG_REPLACE函数的等效内容是什么?
$html = ereg_replace("[^A-Za-z._0-9@ ]"," ",$html);
答案 0 :(得分:2)
$html = preg_replace("/[^A-Za-z._0-9@ ]/"," ",$html);
最大的区别是两端的分隔符,尽管还有其他分隔符。阅读here。
答案 1 :(得分:0)
$html = preg_replace("/[^A-Za-z._0-9@ ]/"," ",$html);