public function extractAuthor($string)
    {
        preg_match_all('/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i', $string, $matches);
        $string = str_replace($matches[0], '', $string);
        $string = str_replace(['<', '>', '()'], '', $string);
        $string = trim($string);

        return empty($string) ? 'Unknown' : $string;
    }
public function extractAuthor($string)
    {
        preg_match_all('/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i', $string, $matches);
        $string = str_replace($matches[0], '', $string);
        $string = str_replace(['<', '>', '()'], '', $string);
        $string = trim($string);

        return empty($string) ? 'Unknown' : $string;
    }
public function extractAuthor ( $ string ) { preg_match_all ( '/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i' , $ string , $ matches ) ; $ string = str_replace ( $ matches [ 0 ] , '' , $ string ) ; $ string = str_replace ( [ '<' , '>' , '()' ] , '' , $ string ) ; $ string = trim ( $ string ) ; return empty ( $ string ) ? 'Unknown' : $ string ; }
Extract the Author name from the string, remove emails if they exist

@param  string $string String to analyze
@return string Author name
Extract the Author name from the string remove emails if they exist