This isn't interoperable with native git and breaks http://www.kernel.org/pub/software/scm/git/docs/gitignore.html .
Patterns are not regular expressions but shell globs as specified in the gitignore help.