static void ai_spec_daysOld() { for (S pat : ai_texts_unquote(".", "Look for answer pattern", "$X")) { SS match = matchDollarVarsIC("$X is $Y days old", pat); continue unless match != null; S who = match.get("$X"); for (S dayBorn : filterMatchDollarX_IC("born on day $X", ai_texts(who, "was", "$Y"))) { S today = matchDollarX_IC("day $X", ai_text("it", "today is", "$X")); if (isInteger(today) && isInteger(dayBorn)) { long age = parseLong(today)-parseLong(dayBorn); post("Answer", "is", who + " is " + age + " days old"); } } } }