I've been chasing around regular expressions for my .hgignore
file, and found several very useful answers on SO (like this) and come up with a regexp I think should work to exclude all files and directories except the ones listed in the negative lookahead.
^(?!(certs/|config/|\.hgignore)).+
It seems to work on RegExr, and follows the pattern from the other SO answer, but the only file shown if I do hg status
is the .hgignore
itself; nothing in certs
or config
is seen by Mercurial. (There are certainly files in there that appear if I remove the .hgignore
.)
What have I got wrong here?