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
SidharthSidharth 

String Split

I have a string like this. I want to split it into list of strings . Ex the below string, should be split into 3 strings.  Each substring consists of Date followed by note.

 

 

[Aug 16, 2011 8:43 am MST Sidharth Agarwal]
testing 

[Jan 12, 2011 7:41 am PST Krystal Harris]
sif approved 

[Jan 11, 2011 12:17 pm MST JR Isom]

Updated account number. 1 number off from account number on statements saved to V.V.

Testing success.

 

-----------

-----------

----------

 

How should i go about splitting such kind of String format?

 

Thanks

Sid

apaiapai

Refer this help page

 

A combination of indexOf, substring and split methods should help.

kiranmutturukiranmutturu

you can use pattern and matcher classes in the apex to find the best solution...