I read that writing a compiler makes you a better computer scientist. So, I think I should write a little compiler for regular expressions. It'll parse a regex, create an abstract syntax tree, use graph analysis to improve the syntax tree, then generate optimized regular expression code. Easy, right?