+ Start a Discussion
Arjun y 7Arjun y 7 

How to separate string values

Hi All,

I have a string which contains in the below format. I want only FailureList value. Can you please let me know how to get the failure list value from string?
String s1 = 'd:[FailureList=null, RecordTypeIDMap={Customer=012j0XXXX}]'

Can you please try below one: 
String resultText = s1.subString(s1.indexof('['), s1.indextof(',')-1);

Sandeep Singhal