borrowed 'format' regexes from tdegrunt