You can't stop a regexp from running, except by conditional from a boolean setting.
...BUT that doesn't prevent you from changing what it is the regexp searches.
Example:
PHP Code:
<RegExp input="$$3" output="\1" dest="8+">
<RegExp input="$$1" output="Buffer 1 contains foo" dest="3">
<expression clear="yes">foo</expression>
</RegExp>
<RegExp input="$$2" output="Buffer 1 contains bar, but not foo" dest="3">
<RegExp input="$$3" output="$$1" dest="2">
<expression clear="yes">^$</expression>
</RegExp>
<expression>bar</expression>
</RegExp>
<expression noclean="1"/>
</RegExp>
The key part is the innermost regexp, if $$3 is empty after the first regexp, then $$1 will be copied to $$2, otherwise $$2 will be cleared. The outer regexp then searches $$2 instead of $$1, and is guaranteed to fail if the earlier regexp succeeded (because $$2 will be empty).
Of course, if you're not bothered about outputting the earlier regexp, you can do it directly:
PHP Code:
<RegExp input="$$2" output="Buffer 1 contains bar, but not foo" dest="8+">
<RegExp input="$$1" output="$$1" dest="2">
<expression clear="yes">^(?!.*foo)</expression>
</RegExp>
<expression>bar</expression>
</RegExp>
(Obviously, you could achieve the above with a single regexp, it's just meant as an example).