- preg_match: documentation ( source)
- str_replace: documentation ( source)
<?php
$section ="code";
preg_match('/@@'.$section.'(.*?)'.$section.'@@/',$this->_documentXML, $display);
$this->_documentXML = str_replace($display[0], "", $this->_documentXML);