class FIXMatrixUtil extends AbstractCaller {

    public static int extractSeqNum(String text) {
        String value = StringUtils.substringBetween(text, "expecting ", " but received");
        value = value == null ? StringUtils.substringBetween(text, "Expected: ", ">") : value;
        value = value == null ? StringUtils.substringBetween(text, "expected (", ")") : value;
        value = value == null ? StringUtils.substringAfterLast(text, "less than expected").trim() : value;
        return Integer.parseInt(value);
    }

}