Loading core/java/android/util/Patterns.java +4 −4 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public class Patterns { = Pattern.compile( // sdd = space, dot, or dash "(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>* + "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>* + "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> + "([0-9][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> /** * Convenience method to take all of the non-null matching groups in a Loading core/tests/coretests/src/android/util/PatternsTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,8 @@ public class PatternsTest extends TestCase { "Me: 16505551212 this\n", "Me: 6505551212 this\n", "Me: 5551212 this\n", "Me: 2211 this\n", "Me: 112 this\n", "Me: 1-650-555-1212 this\n", "Me: (650) 555-1212 this\n", Loading Loading
core/java/android/util/Patterns.java +4 −4 Original line number Diff line number Diff line Loading @@ -172,7 +172,7 @@ public class Patterns { = Pattern.compile( // sdd = space, dot, or dash "(\\+[0-9]+[\\- \\.]*)?" // +<digits><sdd>* + "(\\([0-9]+\\)[\\- \\.]*)?" // (<digits>)<sdd>* + "([0-9][0-9\\- \\.][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> + "([0-9][0-9\\- \\.]+[0-9])"); // <digit><digit|sdd>+<digit> /** * Convenience method to take all of the non-null matching groups in a Loading
core/tests/coretests/src/android/util/PatternsTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -156,6 +156,8 @@ public class PatternsTest extends TestCase { "Me: 16505551212 this\n", "Me: 6505551212 this\n", "Me: 5551212 this\n", "Me: 2211 this\n", "Me: 112 this\n", "Me: 1-650-555-1212 this\n", "Me: (650) 555-1212 this\n", Loading