code: public static String parseEchoErrorStatement(String statement) {
          Matcher matcher = EchoErrorToken.matcher(statement);
          if (matcher.matches()) {
              String commandWordTerminator = matcher.group(1);
              if (OneWhitespace.matcher(commandWordTerminator).matches()) {
                  return matcher.group(2);
              }
              return "";
          }
          return null;
      }
docs: Parse ECHOERROR statement for sqlcmd.
  The result will be "" if the user just typed ECHOERROR.
  @param statement  statement to parse
  @return           Argument text or NULL if statement wasn't recognized