I've never done this myself, but there is an example of a metaprogramming regex parser at the bottom of this page: http://www.digitalmars.com/d/templates-revisited.html Kevin