public static function clearStyle($value) { $value = preg_replace("~<(a|ol|ul|li|h[1-6r]|d[dlt]|em|p|i|b|s|strong|span|div|table|t[dhr])\\s?(style.*)?/>~i", "<\$1>", $value); return $value; }