void (RegExpChar ch) { final String text = ch.getUnescapedText(); if (!text.startsWith("\\") || !RegExpLanguageHosts.getInstance().isRedundantEscape(ch, text)) { return; } if (text.equals("\\{") && !(ch.getParent() instanceof RegExpClass)) { return; } if (ignoreEscapedMetaCharacters && (text.equals("\\}") || text.equals("\\]")) && !(ch.getParent() instanceof RegExpClass)) { return; } final ASTNode astNode = ch.getNode().getFirstChildNode(); if (astNode == null || astNode.getElementType() != RegExpTT.REDUNDANT_ESCAPE) { return; } myHolder.registerProblem(ch, RegExpBundle.message("inspection.warning.redundant.character.escape.0.in.regexp", ch.getText()), new RemoveRedundantEscapeFix()); }