fylix0000
asked on
How can I parse a text file?
Hi all, I have a file call default.cfg , it is actually a simple text file with the following format:
#define ContactSurname=William
#define ContactGiven=Bob
#define ContactPhone=1234567890
#define ContactExt=123
#define EntityName=secret101
#define Street=12 street
#define City=San Francisco
#define Country=USA
#define Zip=123456
and so on and so on.
My question is, how could I create a java program to parse these values such that I could call
return findValue("ContactSurname" ) then my result would be "William"?
#define ContactSurname=William
#define ContactGiven=Bob
#define ContactPhone=1234567890
#define ContactExt=123
#define EntityName=secret101
#define Street=12 street
#define City=San Francisco
#define Country=USA
#define Zip=123456
and so on and so on.
My question is, how could I create a java program to parse these values such that I could call
return findValue("ContactSurname"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks, I'm learning how to answer questions better and better. =)
ASKER