boolean (final @NotNull RegExpChar ch, final @NotNull String text) { if (text.length() <= 1) { return false; } final RegExpLanguageHost host = findRegExpHost(ch); if (host != null) { final char c = text.charAt(1); return !host.characterNeedsEscaping(c, ch.getParent() instanceof RegExpClass); } else { return !("\\]".equals(text) || "\\}".equals(text)); }