ParseSettings (@NotNull String url) { Pattern startSection = CLASS_DATA_START; Pattern endSection = CLASS_DATA_END; boolean anchorPresent = false; Matcher anchorMatcher = ourAnchorSuffix.matcher(url); if (anchorMatcher.find()) { anchorPresent = true; startSection = Pattern.compile(" (name|id)=\"" + Pattern.quote(StringUtil.escapeXmlEntities(anchorMatcher.group(1))) + "\"", Pattern.CASE_INSENSITIVE); endSection = NON_CLASS_DATA_END; } return new ParseSettings(startSection, endSection, !anchorPresent, anchorPresent); }