On Wed, 2005-06-01 at 17:32 +0200, Peter Simons wrote: > Timothy Brownawell writes: > > > You keep an old version around until the server is > > updated. > > Alright. > > Is there any chance of getting support for "not" matches? So > that I could synchronize all to.cryp.* branches _except_ > to.cryp.foobar by specifying something like this: > > !^to\.cryp\.foobar$ > ^to\.cryp.*
The entire string has to be matched, so the ^ and $ are redundant. Meaning, for example, that "monotone" and ".*monotone.*" are entirely different. > I know about [^...] in regular expressions, but that's not > quite the same. We're using boost::regex, which already supports what you want: Forward Lookahead Asserts There are two forms of these; one for positive forward lookahead asserts, and one for negative lookahead asserts: "(?=abc)" matches zero characters only if they are followed by the expression "abc". "(?!abc)" matches zero characters only if they are not followed by the expression "abc". http://www.boost.org/libs/regex/doc/syntax.html So, to\.cryp\.(?!foobar).* is what you want. Tim _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel