Answer the question
In order to leave comments, you need to log in
Why doesn't regex validate?
There is such a regular
(SM-\d{1,}|Infrastructure|FIX) - \S.*
expression I try to send such a value
SM-38 - [FIX] - fix code style
but it does not accept
Answer the question
In order to leave comments, you need to log in
(SM-\d+ - \[(Infrastructure|FIX)\]) - \S.*
https://regex101.com/r/FAaQ5b/1
In general, you did not provide enough cases for a normal answer.
Maybe this is more suitable for you:
(SM-\d+ - )?(\[(Infrastructure|FIX)\] - )?\s*.*
Here the ticket-id is optional and the commit type is optional and in extreme cases at least the text will be matched.
Although if a validator, then you probably want to. so that all commits are tied to tickets and marked with a type.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question