private static boolean isRegularExpressionSpecialCharacter(char ch) {
        switch (ch) {
            case '$':
            case '(':
            case ')':
            case '+':
            case '.':
            case '[':
            case ']':
            case '^':
            case '{':
            case '|':
                return true;
            default:
                break;
        }
        return false;
    }
Returns true if the character is a special character for regular expressions.
shell/src/main/java/org/apache/kafka/shell/glob/GlobComponent.java