Skip to content

a small question about our regex parts #1216

Closed Answered by captn3m0
usta asked this question in Q&A
Discussion options

You must be logged in to vote

The $ in a regex denotes end of the line. If you are copy-pasting arbitary text, where the matching text (tag name) might be anywhere, the $ will break things since it expects the matching part to end the string.

This is important since we want to match the "complete" tag in all cases, and not a partial tag. As an example from your screenshot, we want to match v5.18, but not v5.18-rc1. The code that powers our automation lists the tags from the upstream project, and checks them one by one, which is akin to listing all the tags with a newline between them.

So the correct way to use our regexes would be to:

  1. Make a list of all the tags. I have a small function for this which I run as get_re…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

usta
May 16, 2022
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by captn3m0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1194 on May 18, 2022 14:10.