$re = '/^((?!([\w!#$%&\'*+\-/=?\^_`{|}~]+(\.[\w!#$%&\'*+\-/=?\^_`{|}~]+)*@((([\-\w]+\.)+[a-zA-Z]{2,4})|(([0-9]{1,3}\.){3}[0-9]{1,3}))))[\S\s])*$/';
$str = 'Dogs welcome. We run a dog sanctuary alongside the house and have a 2 acre fenced paddock which can be used for dog walking/training. Events must end by 11pm.
You can find some details of the land';
preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php