Object () { if (getInjections().length > 0) return null; PsiElement child = getFirstChild(); if (child == null) return null; child = child.getNextSibling(); if (child == null || child.getNode().getElementType() != GroovyTokenTypes.mREGEX_CONTENT && child.getNode().getElementType() != GroovyTokenTypes.mDOLLAR_SLASH_REGEX_CONTENT) { return null; } final StringBuilder chars = new StringBuilder(); final boolean isDollarSlash = child.getNode().getElementType() == GroovyTokenTypes.mREGEX_CONTENT; GrStringUtil.parseRegexCharacters(child.getText(), chars, null, isDollarSlash); return chars.toString(); }