problem is fixed, it was caused by utf-8 header, yeah, that utf-8 thing, preg_match, preg_replace doesnt like it with ^ operator.... For now 'top' ads stay there, I tried to remove it, but it is not so easy, as I thought. mb_internal_encoding('UTF-8'); Or add (*UTF8) at the beginning of your patter...