corvid wrote:
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.
Oh sorry, I didn't realise that was your concern. I have always taken it for granted that negation with [^...] would work in any of the popular scripting languages. It just didn't occur to me to worry whether Python regexps might be any different.
But putting a dpi file in a subdir now, it does exactly what we want. Ah, experimentation, it's a beautiful thing...
Looks like I got away with it then :-) . I have pushed the patch because I think it's a no-brainer (but I'll be happy to revert/amend it if others disagree). Regards, Jeremy Henty