Trivial string substitution/parser

Samuel newsgroups at debain.org
Sun Jun 17 05:53:13 EDT 2007


Hi,

How would you implement a simple parser for the following string:

---
In this string $variable1 is substituted, while \$variable2 is not.
---

I know how to write a parser, but I am looking for an elegant (and lazy) 
way. Any idea?

-Samuel



More information about the Python-list mailing list