I\'m creating a web shell client and successfully created a simple terminal.
expect.sendLine( command ); String result = expect.expect( Matchers.contains(":")).getInput(); int pos = result.indexOf(PROMPT); if (pos > -1) { // SUCCESS } else { // FAILURE }