Projects
Infrastructure
libphutil
0003-Parse-From-lines-in-the-format-user-domain...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-Parse-From-lines-in-the-format-user-domain.com-user-.patch of Package libphutil
From 8db627c736e3308d802206c182b0c9ddd7a2f148 Mon Sep 17 00:00:00 2001 From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> Date: Fri, 29 Jul 2016 12:36:11 +0200 Subject: [PATCH 3/3] Parse From: lines in the format "user@domain.com (user)" correctly. --- src/parser/PhutilEmailAddress.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parser/PhutilEmailAddress.php b/src/parser/PhutilEmailAddress.php index b9a3a44..be811de 100644 --- a/src/parser/PhutilEmailAddress.php +++ b/src/parser/PhutilEmailAddress.php @@ -24,6 +24,10 @@ final class PhutilEmailAddress extends Phobject { $local_part = $matches[2]; $domain_name = null; } + } else if (preg_match('/^(.*)@(.*)\s\((.*)\)$/', $email_address, $matches)) { + $display_name = $matches[3]; + $local_part = $matches[1]; + $domain_name = $matches[2]; } else if (preg_match('/^(.*)@(.*)$/', $email_address, $matches)) { $display_name = null; $local_part = $matches[1]; -- 2.7.4
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.