/* Example: ---------- 1. ERROR in /home/stefan/JavaX-Caches/Temp/1642773472353/UserCode_1642773470538.java (at line 26) xg.fillRect(10, 10, 10, 10); ^^ xg cannot be resolved ---------- */ sclass ECJError { } static L parseECJOutputForErrors(S text) { LS lines = lines(text); for i over lines: { if (startsWith(lines.get(i), "---")) { LS groups = regexpFirstGroups("^\\d+. ERROR in (.*?) \\(at line \\d+\\)$", get(lines, i+1)); if (groups != null) { print(groups); } } } null; }