Clean up regex in InitCommand::parseAuthorString
Per comments: - https://github.com/composer/composer/pull/5638#discussion_r76972844 - https://github.com/composer/composer/pull/5638#discussion_r76973941pull/5645/head
parent
ac41bb0615
commit
09dad8a018
|
@ -320,7 +320,7 @@ EOT
|
||||||
*/
|
*/
|
||||||
public function parseAuthorString($author)
|
public function parseAuthorString($author)
|
||||||
{
|
{
|
||||||
if (preg_match('/^(?P<name>[- \.,\p{L}\p{N}\'’\"\(\)]+) <(?P<email>.+?)>$/u', $author, $match)) {
|
if (preg_match('/^(?P<name>[- .,\p{L}\p{N}\'’"()]+) <(?P<email>.+?)>$/u', $author, $match)) {
|
||||||
if ($this->isValidEmail($match['email'])) {
|
if ($this->isValidEmail($match['email'])) {
|
||||||
return array(
|
return array(
|
||||||
'name' => trim($match['name']),
|
'name' => trim($match['name']),
|
||||||
|
|
Loading…
Reference in New Issue