This is what I want to achieve:
I have a text file as following:
TEL :<$MY_TAG FIELD=tel>
I want to write a c program that read in this template file and replace <$MY_TAG ??????> with the data I retrieved from a database. And then prints out this file.
Can someone please tell me what's the good algorithm to use? Should I read this file into memory first and processes it from there.
Or is there any third-party C library that can help me do this?
Thanks in advance.