I am using Jenkins (v1.592) with Git Client Plugin (v1.12.0) and Git Plugin (v2.3).
I have a build-job that has to be triggered if there have been changes in my git-repository if the changes are made NOT in origin/master or origin/name branches, while N is a decimal number.
I was very happy to see, that Jenkins allowes regular expressions as a branch-specifier at the "Branches to build" option. But unfortunately I do not get my expression to work correctly:
My expression is:
:master|name(\d+)
I also activated "Strategy for choosing what to build" with option "Inverse".
When I am now pushing something onto my master-build it will be selected and the build starts.
I am using "Poll SCM" with no schedule and trigger a build with a call to the Jenkins notifyCommit URL.
I also tried to use: (?!(origin/master|origin/name\d+)) as regex without inverse option but get an error here.