function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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}]'

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

Thanks
Sandeep Singhal
http://www.codespokes.com/