TextContent (Set<Character> suffixChars) { if (suffixChars.isEmpty()) return this; Pattern pattern = Pattern.compile("(" + Strings.join(suffixChars, c -> Pattern.quote(String.valueOf(c)), "|") + ")(?=\n)"); return excludeRanges(ContainerUtil.map(Text.allOccurrences(pattern, this), Exclusion::exclude)); }