in reply to Re^3: This regexp made simpler
in thread This regexp made simpler

Indeed. That was the main point I was going to contribute, but you've beat me to it.

The OP even specifically says he wants to match "any number of characters not containing Z", which is properly written [^Z]*. .*?Z means "the shortest available sequence of any character at all (except, usually, newlines), followed by a Z", which is not quite the same thing.