Просмотр поста #15554: Функция preg_replace();

.
Янулов

Вот как надо
$str = preg_replace('/<!DOCTYPE(.*?)<body>/si','',$str);