List<TextRange> (@NotNull String s) { final List<TextRange> ranges = new ArrayList<>(); Matcher matcher = PyStringLiteralDecoder.PATTERN_ESCAPE.matcher(s); while (matcher.find()) { ranges.add(TextRange.create(matcher.start(), matcher.end())); } return ranges; }