This may be a naïve question, but what about telling it what words the pattern should not match?
Of course, you could generate two patterns; one with the words you do want to match and the other with words you don't. Then simply handle the logic in your program.
So this seems not to be the tool to auto-create a .gitignore file...