Something along these lines?
$replacement = 'Ok, I am the new replacment code you ordered';
$str = <<<DATA
Do not replace data here
/////////////////////////// start
Just replace data here
/////////////////////////// end
Do not replace data here
DATA;
echo $str . '<br /><br />';
$str = preg_replace('#(/+ start).*?(/+ end)#s', "$1 " . $replacement . " $2", $str);
echo $str;
Output:
Do not replace data here /////////////////////////// start Just replace data here /////////////////////////// end Do not replace data here
Do not replace data here /////////////////////////// start Ok, I am the new replacment code you ordered /////////////////////////// end Do not replace data here