Extract string using Split String

I have multiple string like this one after the other in text file
firstName:::: ABC.
lastName:::: XYZ.

and I want to split only value from above string like (ABC,XYZ,764567345)
How to do this by using split method.
Can anyone knows the answer of this?
Thanks in advance.

Hi @Mohini_Shelke,

First split the string using environment.newline
For Loop it
Then replace the ‘::::’ to # and again split using # and get second string is name like that get other values.


Other way to Do is
Split the string using environment.newline
Then replace the ‘::::’ to # in all the available lines
Get the index of #
Use substring with the help of index

Try below solution:
Assign :

Str_SplitString = Str_rawtext.Split({"firstName:::: "},System.StringSplitOptions.None)(1).Trim.Split(System.Environment.Newline(0))(0).Trim`