The DOM method is probably superior because you don't have to worry about case sensitive, whitespace, etc.
$dom = new DOMDocument;
$dom->loadHTML($html);
$xpath = new DOMXPath($dom);
foreach ($xpath->query('//div[@class="main_title"]') as $node) {
$node->parentNode->removeChild($node);
}
$output = $dom->saveHTML();
It's possible to do with regex, especially if you can trust that your input will follow a very specific format (no extra whitespace, perhaps no case discrepancies, etc.) Your main issue is a lack of PCRE delimiters.
$output = preg_replace('@<div class="main_title">.*?</div>@', '', $output);