title: Branch specifier regex in Jenkins scripted pipeline
body: <p>Suppose i want to define pipeline for different branches under same scripted pipeline, how to define the regex for certain pattern of branches. Say for example :-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>if(env.BRANCH_NAME ==~ /release.*/){
    stage("Deploy"){
    echo 'Deployed release to QA'
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here i want to define that regex in such a way for any branch of the pattern</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>*release*</code></pre>
  </div>
  </div>
  </p>
  
  <p>(meaning any branch with release string in it).
  How to achieve that?</p>
  
  <p>And similarly how to achieve something like :-</p>
  
  <p>if the branch is anything but develop, master, release(pattern).</p>