protected function parseAuthor($string) { if (preg_match('/^(?P<name>[- \\.,\\p{L}\\p{N}\'’]+) <(?P<email>.+?)>$/u', $string, $match)) { $this->email = $match['email']; $this->authorName = trim($match['name']); } }