This works for me, give it a try:
$string = 'This is text above
//startHere
This is text inside
//endHere this is text below.';
$string = preg_replace("~\n~",' ',$string);
if(preg_match('~//startHere(.+?)//endHere~i',$string,$matches)){
$myText = $matches[1];
}else{
$myText = '';
}
echo '<textarea>'.$myText.'</textarea>';