diff --git a/product/ERP5/Document/Telephone.py b/product/ERP5/Document/Telephone.py index fb96cc9862842e1b381b444d3b66bb6b11c12cb7..596f342ff4a3c9551802f1f85782dfd293e7136f 100644 --- a/product/ERP5/Document/Telephone.py +++ b/product/ERP5/Document/Telephone.py @@ -72,64 +72,67 @@ class Telephone(Coordinate, Base): # be carefull to add a new regex. regex_list = [ # Country, Area, Number, Extension* - # +33(0)2-27224896/999 or +33(0)2-27224896/ or +33(0)2-27224896 - "\+(?P<country>\d+)\(0\)(?P<area>\d+)\-(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", + # +11(0)1-11111111/111 or +11(0)1-11111111/ or +11(0)1-11111111 + # + 11 (0)1-11 11 01 01/111 or + 11 (0)1-11 11 01 01/ or + 11 (0)1-11 11 01 01 + # +11 (0)11 1011 1100/111 or +11 (0)11 1011 1100/ or +11 (0)11 1011 1100 + "\+(?P<country>[\d\ ]*)\(0\)(?P<area>\d+)(\-|\ )(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", # Country, Area, Number, Extension* - # +81-2-27224896/999 or +81-2-27224896/ or +81-2-27224896 + # +11-1-11111111/111 or +11-1-11111111/ or +11-1-11111111 "\+(?P<country>\d+)-(?P<area>\d+)-(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", # Missing area - # +33(0)-27224896/999" or +33(0)-27224896/ or +33(0)-27224896 + # +11(0)-11111111/111" or +11(0)-11111111/ or +11(0)-11111111 "\+(?P<country>\d+)\(0\)\-(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", # Country, Area, Number, Extension* - # +55(2)27224896/999 or +55(2)27224896/ or +55(2)27224896 + # +11(1)11111111/111 or +11(1)11111111/ or +11(1)11111111 "\+(?P<country>\d+)\((?P<area>\d+)\)(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", # Country, Area, Number, Extension* - # +221-2-27224896/999 or +221-2-27224896/ or +221-2-27224896 + # +111-1-11111111/111 or +111-1-11111111/ or +111-1-11111111 "\+(?P<country>\d+)-(?P<area>\d+)-(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", # Missing country - # +(0)2-27224896/999" or +(0)2-27224896/ or +(0)2-27224896 + # +(0)1-11111111/111" or +(0)1-11111111/ or +(0)1-11111111 "\+\(0\)(?P<area>\d+)\-(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", # Missing Country and Area - # +(0)-27224896/999" or +(0)-27224896/ or +(0)-27224896 + # +(0)-11111111/111" or +(0)-11111111/ or +(0)-11111111 "\+\(0\)\-(?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", # Area, Number Extension* # Area between parenthesis. - # (22)27224897/333 or (22)27224897/ or (22)27224897 + # (11)11111111/111 or (11)11111111/ or (11)11111111 "\((?P<area>\d+)\)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", # Missing country - # +(2)27224896/999" or +(2)27224896/ or +(2)27224896 + # +(1)11111111/111" or +(1)11111111/ or +(1)11111111 "\+\((?P<area>\d+)\)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", # Country, Area, Number and Extension* # Country space area space number slash extension or not - # +33 2 098765432/1 or +33 2 098765432/ or +33 2 098765432 - "\+(?P<country>\d+)\ (?P<area>\d+)\ (?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", + # +11 1 011111111/1 or +11 1 011111111/ or +11 1 011111111 + # + 111 1 1101 101/111 or + 111 1 1101 101/ or + 111 1 1101 101/111 + "\+(?P<space>[\ ]*)(?P<country>\d+)\ (?P<area>\d+)\ (?P<number>[\d\ ]*)(?:\/)?(?P<ext>\d+|)", # This regex is to handle two inputs very similar # but with different behavior - # 631 22 43/999 or 631 22 43 or 631 22 43 - # will result in {'area':'', 'number':'631 22 43', 'ext':'999 or empty'} + # 111 11 11/111 or 111 11 11 or 111 11 11 + # will result in {'area':'', 'number':'111 11 11', 'ext':'111 or empty'} # - # 631-22 43/999 or 631-22 43 or 631-22 43 - # will result in {'area':'631', 'number':'22 43', 'ext':'999 or empty'} + # 111-11 11/111 or 111-11 11 or 111-11 11 + # will result in {'area':'111', 'number':'11 11', 'ext':'111 or empty'} "^(?:0)?((?P<area>\d+)-)?(?P<number>[\d\-\ ]*)(?:\/)?(?P<ext>\d+|)$", # Area, Number, Extension* # It is a common input in France # and in Japan but with different behavior. - # 047-336-5411/999 or 047-336-5411/ or 047-336-5411 - # will result in {'area':'47', 'number':'336-5411', \ - # 'ext':'999 or empty'} <= France - # will result in {'area':'047', 'number':'336-5411', - # 'ext':'999 or empty'} <= Japan + # 011-111-1111/111 or 011-111-1111/ or 011-111-1111 + # will result in {'area':'11', 'number':'111-1111', \ + # 'ext':'111 or empty'} <= France + # will result in {'area':'011', 'number':'111-1111', + # 'ext':'111 or empty'} <= Japan # so we have here two regex: # To France: "^0(?P<area>\d+)-(?P<number>[\d\-\ ]*)(?:\/)?(?P<ext>\d+|)$", # To Japan: "^(?P<area>\d+)-(?P<number>[\d\-\ ]*)(?:\/)?(?P<ext>\d+|)$", @@ -137,11 +140,11 @@ class Telephone(Coordinate, Base): # Area, Number, Extension* # It is a common input in France and in Japan but with different behavior. - # 047(336)5411/999 or 047(336)5411/ or 047(336)5411 - # will result in {'area':'47', 'number':'336)5411', - # 'ext':'999 or empty'} <= France - # will result in {'area':'047', 'number':'336)5411', - # 'ext':'999 or empty'} <= Japan + # 011(111)1111/111 or 011(111)1111/ or 011(111)1111 + # will result in {'area':'11', 'number':'111)1111', + # 'ext':'111 or empty'} <= France + # will result in {'area':'011', 'number':'111)1111', + # 'ext':'111 or empty'} <= Japan # so we have here two regex: #To France: # "^0(?P<area>\d+)\((?P<number>[\d\)\(\ \-]*)(?:\/)?(?P<ext>\d+|)$", @@ -150,8 +153,75 @@ class Telephone(Coordinate, Base): "^0(?P<area>\d+)\((?P<number>[\d\)\(\ \-]*)(?:\/)?(?P<ext>\d+|)$", # Missing area - # +55()27224896/999" or +55()27224896/ or +55()27224896 - "\+(?P<country>\d+)\(\)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)" + # +11()11111111/111" or +11()11111111/ or +11()11111111 + "\+(?P<country>\d+)\(\)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Country, area, number, extension* + # Space between country and (0). + # Space between (0) and area. + # Space between area and number. + # +111 (0) 1 111 11011/111 or +111 (0) 1 111 11011/ or +111 (0) 1 111 11011 + "\+(?P<country>\d+)\ \(0\)\ (?P<area>\d+)\ (?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Country and number + # (0) between country and number + # +111 (0) 111111101-01/111 or +111 (0) 111111101-01/ or +111 (0) 111111101-01 + "\+(?P<country>\d+)\ \(0\)\ (?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Country, area, number and extension* + # +11 (11) 1111 1111/111 or +11 (11) 1111 1111/ or +11 (11) 1111 1111 + # +11 (11)-10111111/111 or +11 (11)-10111111/ or +11 (11)-10111111 + # +11(11)-10111111/111 or +11(11)-10111111/ or +11(11)-10111111 + # 1 (111) 1101-101/111 or 1 (111) 1101-101/ or 1 (111) 1101-101/ + "(\+|)(?P<country>\d+)\ \((?P<area>\d+)\)(\ |\-|)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # +110 1111111/111 or +110 1111111/ or +110 1111111 + "\+(?P<country>\d+)\ (?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Missing country + # 111/111-1111/111 or 111/111-1111/ or 111/111-1111 + "(?P<area>\d+)\/(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Country, area, number, extension* + # Hyphen between country and area. + # +11-1 11 11 01 11/111 or +11-1 11 11 01 11/ or +11-1 11 11 01 11 + "\+(?P<country>\d+)\-(?P<area>\d+)\ (?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Missing area + # +111-1101110/111 or +111-1101110/ or +111-1101110 + "\+(?P<country>\d+)\-(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Missing country + # Dot between area number and telephone number. + # 111.111.1111/111 or 111.111.1111/ or 111.111.1111 + "(?P<area>\d+)\.(?P<number>[\d\ \-\.]*)(?:\/)?(?P<ext>\d+|)", + + # Country, area, number and extensioin* + # (111 11) 111111/111 or (111 11) 111111/ or (111 11) 111111 + # (111 11) 111-11-11/111 or (111 11) 111-11-11/ or (111 11) 111-11-11 + # (111 11)101011/111 or (111 11)101011/ or (111 11)101011 + # +(111 11) 100-11-11/111 or +(111 11) 100-11-11 or +(111 11) 100-11-11 + "(\+|)\((?P<country>\d+)\ (?P<area>\d+)\)(\ |)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Country and number + # (+111)101111111/111 or (+111)101111111/ or (+111)101111111 + # (+111) 101111111/111 or (+111) 101111111/ or (+111) 101111111 + "\(\+(?P<country>\d+)\)(\ |)(?P<number>[\d\ \-]*)(?:\/)?(?P<ext>\d+|)", + + # Country, area, number and extension* + # (+11-111) 1111111/111 or (+11-111) 1111111/ or (+11-111) 1111111 + # (11-11) 111-1111/111 or (11-11) 111-1111/ or (11-11) 111-1111 + # (11-1) 1.111.111/111 or (11-1) 1.111.111/ or (11-1) 1.111.111 + "\((\+|)(?P<country>\d+)\-(?P<area>\d+)\)(\ |\-|)(?P<number>[\d\ \-\.]*)(?:\/)?(?P<ext>\d+|)", + + # Country, area, number and extersion* + # + 111-11-1110111/111 or + 111-11-1110111/ or + 111-11-1110111 + # +111-11-1110111/111 or +111-11-1110111/ or +111-11-1110111 + # +111/1/1111 1100/111 or +111/1/1111 1100/ or +111/1/1111 1100 + "\+(?P<spaces>[\ ]*)(?P<country>\d+)(\-|\/)(?P<area>\d+)(\-|\/)(?P<number>[\d\ \-\.]*)(?:\/)?(?P<ext>\d+|)", + + # + (111) 111-111/111 or + (111) 111-111/ or + (111) 111-111 + "\+(?P<spaces>[\ ]*)\((?P<country>\d+)\)\ (?P<number>[\d\ \-\.]*)(?:\/)?(?P<ext>\d+|)" ] security.declareProtected(Permissions.ModifyPortalContent, 'fromText') @@ -164,6 +234,9 @@ class Telephone(Coordinate, Base): if coordinate_text is None: coordinate_text = '' + # Removing the spaces of the begin and end. + coordinate_text = coordinate_text.strip() + # This regexp get the coordinate text # and extract number and letters input_regex_without_markup = '[0-9A-Za-z]' @@ -176,15 +249,14 @@ class Telephone(Coordinate, Base): possible_number_match = re.match(regex, coordinate_text) if possible_number_match not in [None]: number_match = possible_number_match + number_dict = number_match.groupdict() break if number_match == None: from zLOG import LOG, WARNING msg = "Doesn't exist a regex to handle this telephone: ", \ coordinate_text LOG('Telephone.fromText', WARNING, msg) - self.edit(telephone_number = input_without_markup) - return - number_dict = number_match.groupdict() + number_dict = {'number' : input_without_markup} else: number_dict = {'number' : coordinate_text} @@ -199,7 +271,7 @@ class Telephone(Coordinate, Base): (extension in ['', None])): country = area = number = extension = '' else: - # The country and area is trying to get from dict, + # Trying to get the country and area from dict, # but if it fails must be get from preference preference_tool = self.portal_preferences if country in ['', None]: @@ -213,8 +285,9 @@ class Telephone(Coordinate, Base): extension = extension.strip() # Formating the number. - # Removing any ")", "(", "-" and " " - for token in [")", "(", "-" ," "]: + # Removing any ")", "(", "-", "." and " " + for token in [")", "(", "-" ,"." ," "]: + country = country.replace(token, '') number = number.replace(token, '') self.edit(telephone_country = country, diff --git a/product/ERP5/tests/testERP5Base.py b/product/ERP5/tests/testERP5Base.py index 1b42a520ff6676950a4dcfc4a92f3a94e047a562..ace729a409398f704dcf2a5da3d01f202f479a13 100644 --- a/product/ERP5/tests/testERP5Base.py +++ b/product/ERP5/tests/testERP5Base.py @@ -883,107 +883,199 @@ class TestERP5Base(ERP5TypeTestCase): tel.setTelephoneExtension(999) self.assertEquals('+33(0)2-12345678/999', tel.asText()) - def test_TelephoneInputList(self): + def test_TelephonePreference(self): pers = self.getPersonModule().newContent(portal_type='Person') tel = pers.newContent(portal_type='Telephone') pref = self.portal_preferences.default_site_preference pref.setPreferredTelephoneDefaultCountryNumber('33') pref.setPreferredTelephoneDefaultAreaNumber('2') pref.enable() - input_list = [ - ["+33(0)2-27224896/999","+33(0)2-27224896/999"], - ["+33(0)2-27224896/","+33(0)2-27224896"], - ["+33(0)2-27224896","+33(0)2-27224896"], + tel.fromText(coordinate_text='11111111') + self.assertEquals('+33(0)2-11111111',tel.asText()) - ["+33(0)-5744896/999","+33(0)2-5744896/999"], - ["+33(0)-5744896/","+33(0)2-5744896"], - ["+33(0)-5744896","+33(0)2-5744896"], - - ["+(0)2-27224896/999","+33(0)2-27224896/999"], - ["+(0)2-27224896/","+33(0)2-27224896"], - ["+(0)2-27224896","+33(0)2-27224896"], - - ["+(0)-27224896/999","+33(0)2-27224896/999"], - ["+(0)-27224896/","+33(0)2-27224896"], - ["+(0)-27224896","+33(0)2-27224896"], - - ["+33(629)024425/222","+33(0)629-024425/222"], - ["+33(629)024425/","+33(0)629-024425"], - ["+33(629)024425","+33(0)629-024425"], - - ["(22)27224897/333","+33(0)22-27224897/333"], - ["(22)27224897/","+33(0)22-27224897"], - ["(22)27224897","+33(0)22-27224897"], - - ["(22)-12345678/222","+33(0)22-12345678/222"], - ["(22)-12345678/","+33(0)22-12345678"], - ["(22)-12345678","+33(0)22-12345678"], - - ["+33 2 098765432/1","+33(0)2-098765432/1"], - ["+33 2 098765432/","+33(0)2-098765432"], - ["+33 2 098765432","+33(0)2-098765432"], - - ["+33 662 1241 1233/999","+33(0)662-12411233/999"], - ["+33 662 1241 1233/","+33(0)662-12411233"], - ["+33 662 1241 1233","+33(0)662-12411233"], - - ["6-62 05 76 14/999","+33(0)6-62057614/999"], - ["6-62 05 76 14/","+33(0)6-62057614"], - ["6-62 05 76 14","+33(0)6-62057614"], - - ["62 05 76 14/999","+33(0)2-62057614/999"], - ["62 05 76 14/","+33(0)2-62057614"], - ["62 05 76 14","+33(0)2-62057614"], - - ["631 22 43/999","+33(0)2-6312243/999"], - ["631 22 43/","+33(0)2-6312243"], - ["631 22 43","+33(0)2-6312243"], - - ["631-22 43/999","+33(0)631-2243/999"], - ["631-22 43/","+33(0)631-2243"], - ["631-22 43","+33(0)631-2243"], - - ["8291212/33","+33(0)2-8291212/33"], - - ["047-336-5411/999","+33(0)47-3365411/999"], - ["047-336-5411/","+33(0)47-3365411"], - ["047-336-5411","+33(0)47-3365411"], - - ["047(336)5411/999","+33(0)47-3365411/999"], - ["047(336)5411/","+33(0)47-3365411"], - ["047(336)5411","+33(0)47-3365411"], - - ["+33 662 1244 4112/999","+33(0)662-12444112/999"], - ["+33 662 1244 4112/","+33(0)662-12444112"], - ["+33 662 1244 4112","+33(0)662-12444112"], - - ["+55(2)27224896/999","+55(0)2-27224896/999"], - ["+55(2)27224896/","+55(0)2-27224896"], - ["+55(2)27224896","+55(0)2-27224896"], - - ["+55()27224896/999","+55(0)2-27224896/999"], - ["+55()27224896/","+55(0)2-27224896"], - ["+55()27224896","+55(0)2-27224896"], - - ["+55()-27224896/999","+55(0)2-27224896/999"], - ["+55()-27224896/","+55(0)2-27224896"], - ["+55()-27224896","+55(0)2-27224896"], - - ["+55(629)024425/222","+55(0)629-024425/222"], - ["+55(629)024425/","+55(0)629-024425"], - ["+55(629)024425","+55(0)629-024425"], - - ["+55 2 098765432/1","+55(0)2-098765432/1"], - ["+55 2 098765432/","+55(0)2-098765432"], - ["+55 2 098765432","+55(0)2-098765432"], - - ["+55 662 1241 1233/999","+55(0)662-12411233/999"], - ["+55 662 1241 1233/","+55(0)662-12411233"], - ["+55 662 1241 1233","+55(0)662-12411233"], - - ["+55-047-12345678/990","+55(0)047-12345678/990"], - ["+55-047-12345678/","+55(0)047-12345678"], - ["+55-047-12345678","+55(0)047-12345678"] + def test_TelephoneCountryAndAreaCodeRemains(self): + pers = self.getPersonModule().newContent(portal_type='Person') + tel = pers.newContent(portal_type='Telephone') + pref = self.portal_preferences.default_site_preference + pref.setPreferredTelephoneDefaultCountryNumber('') + pref.setPreferredTelephoneDefaultAreaNumber('') + pref.enable() + tel.fromText(coordinate_text='+11 1 11111111') + tel.fromText(coordinate_text='+22333445555') + self.assertEquals('+(0)-22333445555',tel.asText()) + + def test_TelephoneInputList(self): + pers = self.getPersonModule().newContent(portal_type='Person') + tel = pers.newContent(portal_type='Telephone') + input_list = [ + ['+11(0)1-11111111/111', '+11(0)1-11111111/111'], + ['+11(0)1-11111111/', '+11(0)1-11111111'], + ['+11(0)1-11111111', '+11(0)1-11111111'], + ['+11(0)-1111111/111', '+11(0)-1111111/111'], + ['+11(0)-1111111/', '+11(0)-1111111'], + ['+11(0)-1111111', '+11(0)-1111111'], + ['+11 111 1111 1111/111', '+11(0)111-11111111/111'], + ['+11(1)11111111/', '+11(0)1-11111111'], + ['+11(1)11111111', '+11(0)1-11111111'], + ['+11()11111111/111', '+11(0)-11111111/111'], + ['+11()11111111/', '+11(0)-11111111'], + ['+11()11111111', '+11(0)-11111111'], + ['+11()-11111111/111', '+11(0)-11111111/111'], + ['+11()-11111111/', '+11(0)-11111111'], + ['+11()-11111111', '+11(0)-11111111'], + ['+11(111)011111/', '+11(0)111-011111'], + ['+11-011-11111111/111', '+11(0)011-11111111/111'], + ['+11-011-11111111/', '+11(0)011-11111111'], + ['+11-011-11111111', '+11(0)011-11111111'], + ['+110 1111111/111', '+110(0)-1111111/111'], + ['+110 1111111/', '+110(0)-1111111'], + ['+110 1111111', '+110(0)-1111111'], + ['+111 11111111/111', '+111(0)-11111111/111'], + ['+111 11111111/', '+111(0)-11111111'], + ['+111 11111111', '+111(0)-11111111'], + ['+(0)1-11111111/111', '+(0)1-11111111/111'], + ['+(0)1-11111111/', '+(0)1-11111111'], + ['+(0)1-11111111', '+(0)1-11111111'], + ['+(0)-11111111/111', '+(0)-11111111/111'], + ['+(0)-11111111/', '+(0)-11111111'], + ['+(0)-11111111', '+(0)-11111111'], + ['+11(111)011111/111', '+11(0)111-011111/111'], + ['+11(111)011111', '+11(0)111-011111'], + ['(11)11111111/', '+(0)11-11111111'], + ['(11)11111111', '+(0)11-11111111'], + ['(11)-11111111/111', '+(0)11-11111111/111'], + ['(11)-11111111/', '+(0)11-11111111'], + ['(11)-11111111', '+(0)11-11111111'], + ['+11 1 011111111/1', '+11(0)1-011111111/1'], + ['+11 1 011111111', '+11(0)1-011111111'], + ['+11 111 1111 1111/', '+11(0)111-11111111'], + ['1-11 01 11 11/111', '+(0)1-11011111/111'], + ['1-11 01 11 11/', '+(0)1-11011111'], + ['1-11 01 11 11', '+(0)1-11011111'], + ['11 01 11 11/111', '+(0)-11011111/111'], + ['11 01 11 11/', '+(0)-11011111'], + ['11 01 11 11', '+(0)-11011111'], + ['111 11 11/111', '+(0)-1111111/111'], + ['111 11 11/', '+(0)-1111111'], + ['111 11 11', '+(0)-1111111'], + ['111-11 11/111', '+(0)111-1111/111'], + ['111-11 11/', '+(0)111-1111'], + ['111-11 11', '+(0)111-1111'], + ['1111111/11', '+(0)-1111111/11'], + ['011-111-1111/111', '+(0)11-1111111/111'], + ['011-111-1111/', '+(0)11-1111111'], + ['011-111-1111', '+(0)11-1111111'], + ['011(111)1111/111', '+(0)11-1111111/111'], + ['011(111)1111/', '+(0)11-1111111'], + ['011(111)1111', '+(0)11-1111111'], + ['111/111-1111/111', '+(0)111-1111111/111'], + ['111/111-1111/', '+(0)111-1111111'], + ['111/111-1111', '+(0)111-1111111'], + ['+11 111111111/111', '+11(0)-111111111/111'], + ['+11 111111111/', '+11(0)-111111111'], + ['+11 111111111', '+11(0)-111111111'], + ['+111-1101110/111', '+111(0)-1101110/111'], + ['+111-1101110/', '+111(0)-1101110'], + ['+111-1101110', '+111(0)-1101110'], + ['110-111111/111', '+(0)110-111111/111'], + ['110-111111/', '+(0)110-111111'], + ['110-111111', '+(0)110-111111'], + ['111.111.1111/111', '+(0)111-1111111/111'], + ['111.111.1111/', '+(0)111-1111111'], + ['111.111.1111', '+(0)111-1111111'], + ['+ 11 (0)1-11 11 01 01/111', '+11(0)1-11110101/111'], + ['+ 11 (0)1-11 11 01 01/', '+11(0)1-11110101'], + ['+ 11 (0)1-11 11 01 01', '+11(0)1-11110101'], + ['+11-1 11 11 01 11/111', '+11(0)1-11110111/111'], + ['+11-1 11 11 01 11/', '+11(0)1-11110111'], + ['+11-1 11 11 01 11', '+11(0)1-11110111'], + ['+111 (0) 1 111 11011/111', '+111(0)1-11111011/111'], + ['+111 (0) 1 111 11011/', '+111(0)1-11111011'], + ['+111 (0) 1 111 11011', '+111(0)1-11111011'], + ['+111 (0) 111111101-01/111', '+111(0)-11111110101/111'], + ['+111 (0) 111111101-01/', '+111(0)-11111110101'], + ['+111 (0) 111111101-01', '+111(0)-11111110101'], + ['+111 111111/111', '+111(0)-111111/111'], + ['+111 111111/', '+111(0)-111111'], + ['+111 111111', '+111(0)-111111'], + ['+111 101011111/111', '+111(0)-101011111/111'], + ['+111 101011111/', '+111(0)-101011111'], + ['+111 101011111', '+111(0)-101011111'], + ['+11 (0)11 1011 1100/111', '+11(0)11-10111100/111'], + ['+11 (0)11 1011 1100/', '+11(0)11-10111100'], + ['+11 (0)11 1011 1100', '+11(0)11-10111100'], + ['+11 (0)10 1101 1111/111', '+11(0)10-11011111/111'], + ['+11 (0)10 1101 1111/', '+11(0)10-11011111'], + ['+11 (0)10 1101 1111', '+11(0)10-11011111'], + ['(111 11) 111111/111', '+111(0)11-111111/111'], + ['(111 11) 111111/', '+111(0)11-111111'], + ['(111 11) 111111', '+111(0)11-111111'], + ['(111 11) 111-11-11/111', '+111(0)11-1111111/111'], + ['(111 11) 111-11-11/', '+111(0)11-1111111'], + ['(111 11) 111-11-11', '+111(0)11-1111111'], + ['(111 11)101011/111', '+111(0)11-101011/111'], + ['(111 11)101011/', '+111(0)11-101011'], + ['(111 11)101011', '+111(0)11-101011'], + ['(+111)101111111/111', '+111(0)-101111111/111'], + ['(+111)101111111/', '+111(0)-101111111'], + ['(+111)101111111', '+111(0)-101111111'], + ['(+111) 11110011/111', '+111(0)-11110011/111'], + ['(+111) 11110011/', '+111(0)-11110011'], + ['(+111) 11110011', '+111(0)-11110011'], + ['+11 (11) 1111 1111/111', '+11(0)11-11111111/111'], + ['+11 (11) 1111 1111/', '+11(0)11-11111111'], + ['+11 (11) 1111 1111', '+11(0)11-11111111'], + ['+11 (11)-10111111/111', '+11(0)11-10111111/111'], + ['+11 (11)-10111111/', '+11(0)11-10111111'], + ['+11 (11)-10111111', '+11(0)11-10111111'], + ['(+11-111) 1111111/111', '+11(0)111-1111111/111'], + ['(+11-111) 1111111/', '+11(0)111-1111111'], + ['(+11-111) 1111111', '+11(0)111-1111111'], + ['(+11-11)-1111111/111', '+11(0)11-1111111/111'], + ['(+11-11)-1111111/', '+11(0)11-1111111'], + ['(+11-11)-1111111', '+11(0)11-1111111'], + ['(11-11) 111-1111/111', '+11(0)11-1111111/111'], + ['(11-11) 111-1111/', '+11(0)11-1111111'], + ['(11-11) 111-1111', '+11(0)11-1111111'], + ['(11-1) 1.111.111/111', '+11(0)1-1111111/111'], + ['(11-1) 1.111.111/', '+11(0)1-1111111'], + ['(11-1) 1.111.111', '+11(0)1-1111111'], + ['+111-11111110/111', '+111(0)-11111110/111'], + ['+111-11111110/', '+111(0)-11111110'], + ['+111-11111110', '+111(0)-11111110'], + ['(11 11) 110 11 11/111', '+11(0)11-1101111/111'], + ['(11 11) 110 11 11/', '+11(0)11-1101111'], + ['(11 11) 110 11 11', '+11(0)11-1101111'], + ['(11 011) 110-10-11/111', '+11(0)011-1101011/111'], + ['(11 011) 110-10-11/', '+11(0)011-1101011'], + ['(11 011) 110-10-11', '+11(0)011-1101011'], + ['+1 (111) 1101-111/111', '+1(0)111-1101111/111'], + ['+1 (111) 1101-111/', '+1(0)111-1101111'], + ['+1 (111) 1101-111', '+1(0)111-1101111'], + ['1 (111) 1101-101/111', '+1(0)111-1101101/111'], + ['1 (111) 1101-101/', '+1(0)111-1101101'], + ['1 (111) 1101-101', '+1(0)111-1101101'], + ['+10 (111) 110 11 11/111', '+10(0)111-1101111/111'], + ['+10 (111) 110 11 11/', '+10(0)111-1101111'], + ['+10 (111) 110 11 11', '+10(0)111-1101111'], + ['+ 111 1 1101 101/111', '+111(0)1-1101101/111'], + ['+ 111 1 1101 101/', '+111(0)1-1101101'], + ['+ 111 1 1101 101', '+111(0)1-1101101'], + ['+11 1111-1111/111', '+11(0)-11111111/111'], + ['+11 1111-1111/', '+11(0)-11111111'], + ['+11 1111-1111', '+11(0)-11111111'], + ['+(111 11) 100-11-11/111', '+111(0)11-1001111/111'], + ['+(111 11) 100-11-11/', '+111(0)11-1001111'], + ['+(111 11) 100-11-11', '+111(0)11-1001111'], + ['+ 111-11-1110111/111', '+111(0)11-1110111/111'], + ['+ 111-11-1110111/', '+111(0)11-1110111'], + ['+ 111-11-1110111', '+111(0)11-1110111'], + ['+ (111) 111-111/111', '+111(0)-111111/111'], + ['+ (111) 111-111/', '+111(0)-111111'], + ['+ (111) 111-111', '+111(0)-111111'], + ['+111/1/1111 1100/111', '+111(0)1-11111100/111'], + ['+111/1/1111 1100/', '+111(0)1-11111100'], + ['+111/1/1111 1100', '+111(0)1-11111100'], ] for i in input_list: