Click here to Skip to main content
15,435,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i need some help in my project a build application in java that read config files from Linux system and i wont to show some value from this files like this

//the code in config file
subnet netmask {
option subnet-mask    ;
option broadcast-address;#commnet here

sow in the application it should be print something like that

network 1 :
  range : from to
  mask :
  broadcast :

so i need to read the value from specified args like "option subnet-mask" to the end of the line is ";" and return just the value "". and if there comment "#" don't do anything just go to next line. and for each configuration is start from "{" and end at "}". so when is cam to "}" is should be stopped. and go for the next network if there. thanks for helping

1 solution

Share this answer
Marwan Jabbour 4-Nov-15 11:44am    
con you give some code example ? and thanks
Richard MacCutchan 4-Nov-15 11:58am    
Follow those links and you will find lots of sample code, complete with detailed explanations.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900