Hi,
I have a config file which has entries like
This is a common config file which is also being parsed by php script and perl scripts.
I have to parse this file in C++, I can get the key value pairs like
Now I have to further parse this key value pair and replace the variable within the curly braces by it's value i.e. /var/maildir,
and create a hash, so that I can reference any of the values by their key.
Appreciate if anybody can help me out with this.
Thanks,
Tewari
I have a config file which has entries like
Code:
DYNAMICBASEDIR : /var/maildir
DYNAMICTEMPDIR : {DYNAMICBASEDIR}/tmp/
USERDATAMAILFILEDIR : {DYNAMICBASEDIR}/domains/
This is a common config file which is also being parsed by php script and perl scripts.
I have to parse this file in C++, I can get the key value pairs like
Code:
key = DYNAMICTEMPDIR and value = {DYNAMICBASEDIR}/tmp/
and create a hash, so that I can reference any of the values by their key.
Appreciate if anybody can help me out with this.
Thanks,
Tewari