code: static boolean matchAttribute(Provider.Service service, String attr, String value) {
          if (value == null) {
              return true;
          }
          final String pattern = service.getAttribute(attr);
          if (pattern == null) {
              return true;
          }
          final String valueUc = value.toUpperCase(Locale.US);
          return valueUc.matches(pattern.toUpperCase(Locale.US));
      }
docs: If the attribute listed exists, check that it matches the regular
  expression.