code: public String getKeyTag(String key) {
      if (tagPattern != null) {
        Matcher m = tagPattern.matcher(key);
        if (m.find()) return m.group(1);
      }
      return key;
    }
docs: A key tag is a special pattern inside a key that, if preset, is the only part of the key hashed
  in order to select the server for this key.
  @see <a href="http://redis.io/topics/partitioning">partitioning</a>
  @param key
  @return The tag if it exists, or the original key