Browse Source

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_r76973941
Matthew "Juniper" Barlett 8 years ago
parent
commit
09dad8a018
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Composer/Command/InitCommand.php

+ 1 - 1
src/Composer/Command/InitCommand.php

@@ -320,7 +320,7 @@ EOT
      */
     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'])) {
                 return array(
                     'name'  => trim($match['name']),