public static byte[] createUnescapdArgument(byte[] filterStringAsByteArray,
    int argumentStartIndex, int argumentEndIndex) {
    int unescapedArgumentLength = 2;
    for (int i = argumentStartIndex + 1; i <= argumentEndIndex - 1; i++) {
      unescapedArgumentLength++;
      if (
        filterStringAsByteArray[i] == ParseConstants.SINGLE_QUOTE && i != (argumentEndIndex - 1)
          && filterStringAsByteArray[i + 1] == ParseConstants.SINGLE_QUOTE
      ) {
        i++;
        continue;
      }
    }

    byte[] unescapedArgument = new byte[unescapedArgumentLength];
    int count = 1;
    unescapedArgument[0] = '\'';
    for (int i = argumentStartIndex + 1; i <= argumentEndIndex - 1; i++) {
      if (
        filterStringAsByteArray[i] == ParseConstants.SINGLE_QUOTE && i != (argumentEndIndex - 1)
          && filterStringAsByteArray[i + 1] == ParseConstants.SINGLE_QUOTE
      ) {
        unescapedArgument[count++] = filterStringAsByteArray[i + 1];
        i++;
      } else {
        unescapedArgument[count++] = filterStringAsByteArray[i];
      }
    }
    unescapedArgument[unescapedArgumentLength - 1] = '\'';
    return unescapedArgument;
  }
Removes the single quote escaping a single quote - thus it returns an unescaped argument
<p>
@param filterStringAsByteArray filter string given by user
@param argumentStartIndex      start index of the argument
@param argumentEndIndex        end index of the argument
@return returns an unescaped argument
hbase-client/src/main/java/org/apache/hadoop/hbase/filter/ParseFilter.java