11 Replies · Latest reply on Oct 24, 2017 11:57 PM by Ankur Bawiskar

    How to Split

      Hi

       

      I have requirement to get the particulate value form given string.

       

      need this value from string = "02140"

       

      \"source\":\"awhuis.trustedadvsdfsiuyiysor\",\"iuiunt\":\"0214ghhjgjh7000\",\"time\":\"2017-10-10T03:26:09Z\",\"region\":\"-ght-1\",\"rees\":[],

       

      I have used this below code but i am getting following result with back slash

       

      account = emailbody.split("account");

      comma = account[1].split(",");

      colon = comma[0].split(":");

      colon1 = colon[1].split('"');

      gs.log(colon1[1]);

       

      Result : 021000\

       

      but want only the digits please help me to resolve this issue

       

      Thanks

      Ramesh