Skip to content
Discussion options

You must be logged in to vote

Oh yeah, that regex I sent was only matching the first number set, 'version: ([\d.]+)' was what I meant to put!
The \d is the same as [0-9], so my regex was just capturing the "1" in "1.5.24" and not matching on the .s. Your regex is probably what you want as it's stricter, forcing the version to be 3 sets of numbers - MAJOR.MINOR.PATCH

regex: 'version: ([0-9]+\.[0-9]+\.[0-9]+)' - This has to be in quotes because otherwise, when reading the YAML, it thinks that you might have forgotten a newline between regex and version, e.g.

regex: 
  version: '([0-9]+\.[0-9]+\.[0-9]+)'

So you need it in quotes to show that the value of the regex key is that whole string.
regex: version:.([0-9]+\.[0-9]+…

Replies: 5 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@JosephKav
Comment options

@JosephKav
Comment options

Comment options

You must be logged in to vote
2 replies
@JosephKav
Comment options

@JosephKav
Comment options

Comment options

You must be logged in to vote
1 reply
@JosephKav
Comment options

Answer selected by JosephKav
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants