<?php

$holder = <<< LOL
<p>some random text</p>

<div class="greybackground_desktop" style="background-color:#EFEFEF;">
<!-- /49527960/CSF_Article_Middle -->
<div style="padding-bottom:10px; padding-top: 10px; text-align:center;" id='div-gpt-ad-1441883689230-0'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1441883689230-0'); });
</script>
</div>
</div>

<p>some more text</p>

<div><p>example of content that will be incorrectly removed</p></div>

<p>Text that follows</p>
LOL;

$result = preg_replace('%<div class="greybackground_desktop".*?</div>\s+</div>%si', '', $holder);

echo $result ;