Android Question Extract data from text file

postasat

Active Member
Licensed User
Longtime User
Hi,
I have a text file in which I use a special separator *!* between the data (can be different but not simple as comma).

example of input message:
phone number*!*name*!*surname*!*weight*!*height*!*
1234567890*!*bob*!*gellish*!*70*!*170*!*

How can I extract all data from text between *!* ?
(every data I must extract have not a fixed lenght)
example:
a = 1234567890
b = bob
c = gellish
d = 70
e = 170

Thank you.
 

DonManfred

Expert
Licensed User
Longtime User
Read the file and use regex to split the lines into values
 
Upvote 0
Top