From b0997c1cfdf22af9b9603d0c26b5aceeca47bbbc Mon Sep 17 00:00:00 2001 From: lararennie Date: Tue, 15 Mar 2016 16:36:49 +0100 Subject: [PATCH] Fixing issue with reg-exp -> the "-" range operator was duplicated as the end of the range as well, causing re2 to fail (and some test failures with newer versions of ICU apparently in some configurations) --- cpp/src/phonenumbers/phonenumbermatcher.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/phonenumbers/phonenumbermatcher.cc b/cpp/src/phonenumbers/phonenumbermatcher.cc index f7d4368a6..406c44609 100644 --- a/cpp/src/phonenumbers/phonenumbermatcher.cc +++ b/cpp/src/phonenumbers/phonenumbermatcher.cc @@ -339,7 +339,7 @@ class PhoneNumberMatcherRegExps : public Singleton { // break two numbers without spaces, and we haven't seen many instances // of it used within a number. regexp_factory_->CreateRegExp( - "[\xE2\x80\x92-\x2D\xE2\x80\x95\xEF\xBC\x8D]" /* "‒-―-" */ + "[\xE2\x80\x92-\xE2\x80\x95\xEF\xBC\x8D]" /* "‒-―-" */ "\\p{Z}*(.+)")); inner_matches_->push_back( // Breaks on a full stop - e.g. "12345. 332-445-1234 is my number."