Return all the keys of Redis db. Filtered by pattern.
@param pattern key pattern
@return key set
436779
public Set<byte[]> keys(byte[] pattern) {
        Set<byte[]> keys = new HashSet<byte[]>();
        Jedis jedis = getJedis();

        try {
            ScanParams params = new ScanParams();
            params.count(count);
            params.match(pattern);
            byte[] cursor = ScanParams.SCAN_POINTER_START_BINARY;
            ScanResult<byte[]> scanResult;
            do {
                scanResult = jedis.scan(cursor, params);
                keys.addAll(scanResult.getResult());
                cursor = scanResult.getCursorAsBytes();
            } while (scanResult.getStringCursor().compareTo(ScanParams.SCAN_POINTER_START) > 0);
        } finally {
            jedis.close();
        }
        return keys;

    }
276083
public function keys($pattern)
    {
        $keys = $this->getDriver()->keys($pattern);

        if ($this->hasMaxSize()) {
            foreach ($keys as $index => $key) {
                if ($this->isMappedKey($key)) {
                    unset($keys[$index]);
                }
            }
        }
        return $keys;
    }
820878
public Set<String> getResources(final Pattern pattern) {
        return getResources(new Predicate<String>() {
            public boolean apply(String input) {
                return pattern.matcher(input).matches();
            }
        });
    }
450304
def keys(pattern = nil, secret_only = nil)
      keys = []
      each_key(pattern, secret_only) do |key|
        keys << key
      end
      keys
    end
92614
public SortArgs get(String pattern) {

        LettuceAssert.notNull(pattern, "Pattern must not be null");

        if (get == null) {
            get = new ArrayList<>();
        }
        get.add(pattern);
        return this;
    }
746793
@Requires("isValidPattern(pattern)")
  public R get(String pattern) {
    String canon = pattern.replace('/', '.');
    boolean exact = !canon.endsWith(".*");
    if (!exact) {
      canon = canon.substring(0, canon.length() - 2);
    }

    String[] parts = canon.split("\\.");
    TernaryNode current = root;
    R best = null;
    for (int i = 0; i < parts.length; ++i) {
      TernaryNode next = current.children.get(parts[i]);
      if (next == null) {
        break;
      }
      if (next.rule != null) {
        if (next.exact) {
          if (exact && i == parts.length - 1) {
            best = next.rule;
          }
        } else {
          best = next.rule;
        }
      }
      current = next;
    }
    return best;
  }
1013069
public int argOffsets(String pattern) {
        for (int i = 0; i < argNames.length; i++) {
            if (Pattern.compile(pattern).matcher(argNames[i]).find()) return i;
        }
        return -1;
    }
922114
public Set<String> keys(String pattern) {
		Jedis jedis = getJedis();
		try {
			return jedis.keys(pattern);
		}
		finally {close(jedis);}
	}
1066372
protected static NumberPattern parse(String pattern) {
    return NUMBER_PATTERN_CACHE.computeIfAbsent(pattern, s -> new NumberPatternParser().parse(s));
  }
993615
def pattern(self, platform, key, compiled=True):
        
        patterns = self._platform_patterns(platform, compiled=compiled)
        pattern = patterns.get(key, self._platform_patterns(compiled=compiled).get(key, None))

        if pattern is None:
            raise KeyError("Patterns database corrupted. Platform: {}, Key: {}".format(platform, key))

        return pattern
815085
public static @Nonnull Predicate nameContains(final @Nonnull Pattern pattern) {
        return new Predicate() {
            @Override
            public boolean isValid(@Nonnull ProcessThread<?, ?, ?> thread) {
                return pattern.matcher(thread.getName()).find();
            }
        };
    }
18289
public static ExqlPattern compile(String pattern) {

        // 从缓存中获取编译好的语句
        ExqlPattern compiledPattern = cache.get(pattern);
        if (compiledPattern == null) {

            // 输出日志
            if (logger.isDebugEnabled()) {
                logger.debug("EXQL pattern compiling:\n    pattern: " + pattern);
            }

            // 重新编译语句
            ExqlCompiler compiler = new ExqlCompiler(pattern);
            compiledPattern = compiler.compile();

            // 语句的缓存
            cache.putIfAbsent(pattern, compiledPattern);
        }

        return compiledPattern;
    }
448069
protected function getServiceKeys($pattern = null)
    {
        $keys = $this->getKeys();
        $serviceKey = $this->getCacheKey();
        $serviceKeys = isset($keys[$serviceKey]) ? $keys[$serviceKey] : [];

        if (!is_null($pattern)) {
            $serviceKeys = $this->filterArrayValuesWithPattern(
                $serviceKeys,
                $pattern
            );
        }

        return $serviceKeys;
    }
1130204
def _keys(self, pattern):
        
        result = []
        for client in self.redis_clients:
            result.extend(list(client.scan_iter(match=pattern)))
        return result
519546
public Set<String> getBaseSkeletons(Set<String> result) {
        if (result == null) {
            result = new HashSet<String>();
        }
        result.addAll(basePattern_pattern.keySet());
        return result;
    }
1001332
def re_keys(self, pattern):
        
        if not pattern.endswith("$"):
            pattern += "$"
        expr = re.compile(pattern)
        return list(filter(expr.match, self.keys()))
523177
List<Node> get(final Pattern... patterns)
   {
      return AbsoluteGetQuery.INSTANCE.execute(this, includeRootPatternFirst(patterns));
   }