regexp tools from textmate in python. Format string and snippets