Channel tag pre-release regex issues

The current documentation at https://octopus.com/docs/key-concepts/projects/channels#Channels-tags says

“Following the standard 2.0.0 semver syntax, a pre-release tag is the alpha numeric text that can appear after the standard major.minor.patch pattern immediately following a hyphen.”

Following this is a table which includes the example:

.* matches any pre-release

However that pattern is matching ALL of the following versions, rather than just the last line!

6.6.3.82
6.6.3.81
6.6.3.80
6.6.3-Trunk1012

If I use (?!^$) then it does match the last line as I require.

So is the documentation wrong in that the regex is not just matching after a hyphen, or is the application wrong in that it is not checking for a hyphen? (or am I just confused :slight_smile:

David

Hi David,

Thanks for getting in touch! So I asked the team and recreated your versions with some dummy packages. It looks like our documentation is wrong here, .* matches anything 0 or more, which selects everything.

Where as it should be .+ which is 1 or more. I have updated our documentation with this and attached a screenshot from my machine where it was working with .+.

Thank you for bringing this to our attention! If you have any further questions or run into any issues, please don’t hesitate to ask.

Best regards,
Daniel