Jeremy wrote:
corvid wrote:
Jeremy wrote:
+^dpi/[^/]*\.dpi$
I get mixed up by the differences in the various regexps out there. Is this "[^/]" intended as a *looks up the term* bracket expression?
The hgignore page says it uses Python/Perl syntax, and the first regexp page that I find ( http://www.greenend.org.uk/rjk/2002/06/regexp.html ) seems to say that Perl and Python just do character classes when given brackets.
[^...] is a negated class. [^/] matches any charar#cter other than /. If I got it right this matches all *.dpi files in the dpi/ directory.
I'm familiar with negation, but it wasn't clear from that page that _all_ regexps work that way. But putting a dpi file in a subdir now, it does exactly what we want. Ah, experimentation, it's a beautiful thing...