From 7063c06efd69071f5dbe5e4898661880b65bf486 Mon Sep 17 00:00:00 2001 From: Guilherme Godoy Date: Tue, 16 Jul 2024 13:47:14 +0100 Subject: [PATCH] incorporate solution from #1631 about givenname and family names --- plugins/importexport/csv/CSVImportExportPlugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/importexport/csv/CSVImportExportPlugin.inc.php b/plugins/importexport/csv/CSVImportExportPlugin.inc.php index 1021bc58dc..6b962fda8d 100755 --- a/plugins/importexport/csv/CSVImportExportPlugin.inc.php +++ b/plugins/importexport/csv/CSVImportExportPlugin.inc.php @@ -210,7 +210,7 @@ function executeCLI($scriptName, &$args) { // But default to press email address based on press path if not present. $givenName = $familyName = $emailAddress = null; $authorString = trim($authorString); // whitespace. - if (preg_match('/^(\w+)(\s+\w+)?\s*(<([^>]+)>)?$/', $authorString, $matches)) { + if (!preg_match('/^([\w.\s]+)\s+([\w\s-]+)?\s*(<([^>]+)>)?$/', $authorString, $matches)) { $givenName = $matches[1]; // Mandatory if (count($matches) > 2) { $familyName = $matches[2];