<?php

$re = '/(.*)<FooBar>/s';
$str = "abcde\n		fghij<FooBar>";
if (preg_match($re, $str, $matches)) {
	echo $matches[1];
}
	