It sounds like you are trying to do negative lookahead. i.e. you are trying to stop matching once you reach some delimiter.
Emacs doesn't support lookahead directly, but it does support the non-greedy version of the *, +, and ? operators (*?, +?, ??), which can be used for the same purpose in most cases.
So for instance, to match the body of this javascript function:
bar = function (args) {
if (blah) {
foo();
}
};
You can use this emacs regex:
function ([^)]+) {[[:ascii:]]+?};
Here we're stopping once we find the two element sequence "};". [[:ascii:]] is used instad of the "." operator because it works over multiple lines.
This is a little different than negative lookahead because the }; sequence itself it matched, however if your goal is to extract everything up until that point, you just use a capturing group \( and \).
See the emacs regex manual: http://www.gnu.org/software/emacs/manual/html_node/emacs/Regexps.html
As a side note, if you writing any kind of emacs regex, be sure to invoke M-x re-builder, which will bring up a little IDE for writing your regex against the current buffer.