我已经升级到 PHP 5.3,我需要知道如何将这些标签转换为 Preg_replace。
有任何想法吗?
$html = ereg_replace("<(/)?(font|span|del|ins)[^>]*>", "", $html);
// then run another pass over the html (twice), removing unwanted attributes
$html = ereg_replace("<([^>]*)(class|lang|style|size|face)=(\"[^\"]*\"|'[^']*'|[^>]+)([^>]*)>", "<\\1>", $html);
$html = ereg_replace("<([^>]*)(class|lang|style|size|face)=(\"[^\"]*\"|'[^']*'|[^>]+)([^>]*)>", "<\\1>", $html);