title: Gitlab Ci: execute a stage for any branch except A or B
body: <p>I want to run the stage <code>publish_snapshot_rpm</code> for any branch except <code>master</code> or <code>release</code>. The pipeline runs successfully but the stage <code>publish_snapshot_rpm</code> is not executed. What am I missing? The part of my <code>gitlab-ci</code> file:</p>
  <pre><code>.publish:
    stage: publish
    tags:
      - dev
    dependencies:
      - build
  
  publish_snapshot_rpm:
    extends: .publish
    only:
  #    for any branch except master or release
      - (?!(master|release)\b)\b\w+
    script:
      - some script here
  </code></pre>