in reply to Problem Replacing Previously Found String
It's hard to help you because your template system doesn't seem to be well defined. Every time I look at it, I see another ambiguity. Most importantly, you seem to desire looping, yet there's nothing in the template telling the template system to loop. For example, I presume
%%Column_Name_Comma%% Varchar(%%Column_Size%%)
should be repeated, seperated by commas, but your templating system has no means of knowing the line should be looped, and has no means of knowing a comma should be added between the lines should it be able to loop.
It seems to me you should go back to the design stage. We can't really help until you know what you want. Given that, maybe you should be using an existing templating system instead of writing your own.
By the way, it's usually easier to parse the template into a tree and work with the tree rather than the flat template. It makes looping trivial.
|
|---|