Originally Posted by chaley
The template functions 'contains', 'switch', and 're' use regexps. After all, templates manipulate text, and when manipulating text, regexps are the best there is.
Without wanting to derail this thread: I've seen that again yesterday while parsing file names. What normally would have been a painful exercise in C/C++ was as easy as just matching a regexp to the names in Python. (I didn't work out, but the filename parsing wasn't to blame.)