This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to search and read values from text file

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
I have text files that construct from category and under it I have some variable and value something like that:

[category1]
foo = "hello"
boo ="bye"

[category2]
boo = "my"
dpp = "name"
num = 242

my function getting 2 args first is category name and the second is the value under this category
do I need to read all the files until im getting to the category and then do while loop until im getting to the next "["
and parse the variable value in-between ?
or there is faster and better way to do it?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Meir,
This forum is for JSP issues.
We have a forum dedicated to IO and Streams.
I'll move this thread there for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic