OSDN Git Service

Simplify proxy regex
authorIrfan Sheriff <isheriff@google.com>
Wed, 22 Aug 2012 21:19:52 +0000 (14:19 -0700)
committerIrfan Sheriff <isheriff@google.com>
Wed, 22 Aug 2012 21:19:52 +0000 (14:19 -0700)
Bug: 6950756
Change-Id: I535be03073cf9f502631498939c841f88fb1617d

src/com/android/settings/ProxySelector.java

index 909496e..f521d6d 100644 (file)
@@ -63,7 +63,7 @@ public class ProxySelector extends Fragment implements DialogCreatable {
             "^$|^[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*(\\.[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*)*$";
     private static final Pattern HOSTNAME_PATTERN;
     private static final String EXCLUSION_REGEXP =
-            "$|^(.?[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*(\\.[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*)*)+$";
+            "$|^[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*(\\.[a-zA-Z0-9]+(\\-[a-zA-Z0-9]+)*)*$";
     private static final Pattern EXCLUSION_PATTERN;
     static {
         HOSTNAME_PATTERN = Pattern.compile(HOSTNAME_REGEXP);