want to verify particular value from message content in resultset

Viewed 15

I have column name MSG_CONT_T and the value is :

[LONDON, , , , , 836805158, , , , CASH_SETTLE_DATE:20220908, CASH_CCY:USD, SEC_SETTLE_DATE:20220908, SEC_VALUE:, , , , , , , , , , , , , , , , SEC_QTY:000000000550, SEC_CLRD_IND:, , FAIL_CODE:, , , , EXT_QTY:000000000550.00, PUB_SYS_C:NTPA0, , , , , , T_ID_C:000000000000000000000001617221, PARTIAL_QTY:000000000550.00, TOTAL_TRD_QTY:000000000700.00, TOTAL_SETTLED_QTY:000000000550.00, MSG_PUBLISHED:2022-09-08T03:32:49]

In this complete string I want to verify partial qty and total trd qty and I am not sure how to get this particular string out of this complete string

I want to get PARTIAL_QTY:000000000550.00 and TOTAL_TRD_QTY:000000000700.00 from this string but I want it as PARTIAL_QTY:550 and TOTAL_TRD_QTY:700 as this is the value in excel

 while (FOBOCA.next()) {
    seqID.add(FOBOCA.getString("SEQ_ID_C"));
    msgcontent.add(FOBOCA.getString("MSG_CONT_T"));
   //seqID.add(FOBOCA.getString("SEQ_ID_C") );
    String partialQty = ExcelData.get(TestCase).get("PARTIAL_QTY");
    String result = FOBOCA.getString("MSG_CONT_T"); // gives "Google Facebook Apple AT&T" as result
    String names = Arrays.toString(result.split("PARTIAL_QTY"));
    System.out.println("names" + names);


    //System.out.println("names" + Arrays.toString(FOBOCA.getString("MSG_CONT_T").split("PARTIAL_QTY",5)));

    //System.out.println("b "+ b);


}
0 Answers
Related