Get and validate string with pattern for a multiline string 
<p>The string looks like this which is queried from a database:</p>

<p>
fname@site.com<br/>
Added description.<br/>
</p>

<p><hr/>
<p></p>

<p>I use this function to validate the email.</p>

<p>
<pre>
email_validator($email){
    $pattern = "/^[a-z]+[a-zA-Z0-9]*[\.|\-|_]?[a-zA-Z0-9]+@([a-zA-Z]+[a-zA-Z0-9]*[\.|\-]?[a-z]+[a-zA-Z0-9]*[a-zA-Z0-9]+){1,4}\.[a-z]{2,4}$/sm";
    if(preg_match($pattern,$email)){
        $result = 1;
        //$result = $match;
    } else {
        $result = 0;
    }
    return $result;
}
</pre>
</p>

<p>A similar function should also return the email address.</p>

<p>How to modify the validation to include the newline.</p>
