At Tue, 28 Sep 2010 23:24:57 +0100, Richard Lewis wrote: > OK, thanks. I was actually deliberately avoiding the brackets as I > assumed brackets in regexes are for capturing, and I'm not capturing > anything here. Hi Richard, ( and ) group alternatives in addition to capturing. You want to group your alternatives after the prefix (^%) which you always want to match (at least I think you always want to match that). Otherwise the prefix ^% will only be part of the first alternative. If you capture as a side effect that is OK. You could also use: "^%system\\|^%junk\\|^%spam" if you *really* don’t want to capture. :) best, Erik
Attachment:
pgp9NW5FNA7mq.pgp
Description: PGP signature