How can I do some github branch name validation in jenkins?
branch should contain only 26 alphanumeric characters and hyphens branch should NOT begin with www, api or admin
One regex for this could be:
^(?!www)(?!admin)(?!api)[a-zA-Z0-9.]{1,26}$
My problem is that I want to do this validation when the job is run.
Where should i put such regex validation for the branch name in jenkins?
PS: in the attached image, that branch for instance is an illegal branch name ... it breaks the validation rule because it starts with www.
thank you