Parsing Escape Characters
Posted on 2004-09-17
Lately I've taken interest in how to process escape characters internally for my own usage. For example, let's say I want "^" to be a special character that my script needs to escape. I would add the traditional escape character to it, so it becomes "\^". However, if that sequence was input, it would need to become "\\^". You get the idea.
Then beyond that, I need to understand the methodology to processing those escape sequences properly and recursively. Can somebody help me out with pseudo-code algorithms for doing this???
500 points for a complete, understandable walkthrough =)