When we add 5\..*, not only 5.0.0 will be matched, but also anything with 5. in it will be matched, e.g. 6.5.0 will also be matched. This caused some unexpected behavior when we are using it.
Maybe update the product_version description to highlight the usage, e.g. adding anchor ^5\..* in order to match any 5.* releases. Or, make the regexp.MatchString more strict to always add a ^ anchor automatically in front the version.
Does this section in the documentation capture what you are describing? If so, we can update the product_version description, like you suggested, with a link to that as well to clarify to users more explicitly.
When we add
5\..*
, not only5.0.0
will be matched, but also anything with5.
in it will be matched, e.g.6.5.0
will also be matched. This caused some unexpected behavior when we are using it.We saw the reference at https://github.com/pivotal-cf/pivnet-resource/blob/master/filter/filter.go#L40, where
regexp.MatchString(version, release.Version)
will be able to match the string in any position.Maybe update the
product_version
description to highlight the usage, e.g. adding anchor^5\..*
in order to match any 5.* releases. Or, make theregexp.MatchString
more strict to always add a^
anchor automatically in front theversion
.