Channel tag rule not working for some regular expressions

I have a develop branch build using GitVersionTask that creates x.y.z-unstable1234 style version numbers. I have defined a channel for full releases (master/release branches), a channel for completed features (develop branch) and a channel for development CI (feature branches).

My build failed to create a release because two channels were a match (Development and Completed Features) according to package version rules. The Development channel has a tag rule that says only match pre-release tags that do not start with unstable. This build was targeting the develop branch which produces the “unstable” build so that the tag expressions should only have matched the Completed Features channel.

It looks like this has not be evaluated correctly. This failure of the expression evaluation is also seen in the design rule window (attached). I have used this expression from the Octopus documentation regarding tag expressions so I’m fairly sure I haven’t stuffed up the expression.

Ha, just cracked it. The issue is because the regular expression being evaluated rolls past “unstable” in the tag and then matches (?!unstable).+ against 0009 and then finds a match.

The following expression will work because it not only qualifies that the term “unstable” must not be before other characters, but also that it not be at the start of the tag


Can you please update the documentation at to change the example from




Hi Rory,
Thanks for the update. Glad to see that you got it working in the end. I have updated the documentation accordingly to help other users who come along and wish to use it to help set up their rules. Regex is hard!
Thanks again,