!752 static S input = [[ a becomes an ]]; p { gSet(toLinesFullTrim(input)); new StringBuilder buf; buf.append("static S calc() {\n"); for (Matches m : gMatch("* becomes *")) buf.append(" s = jreplace(s, " + quote(m.unq(0)) + ", " + quote(m.unq(1)) + ");\n"); buf.append("}"); print(buf); }