title: Build Trigger doesn't recognize Negative Lookahead in RegExp on Cloud Build
body: <p>I'm using Cloud Build as a CI/CD solution. My branching strategy follows this pattern: <code>dev</code>, <code>stage</code> and <code>prod</code> branches reflect exactly what I have in each of my environments. Any other branch is just a regular branch for development.</p>
  
  <p>By following this pattern, I need to build/test in any branch except the main ones, and deploy only when pushes are in dev/stage/prod.</p>
  
  <p>As Cloud Build doesn't support expressing this in a single YAML file, I have two: <code>build.yaml</code> and <code>deploy.yaml</code>.</p>
  
  <p>Then I created two Build Triggers, like this:</p>
  
  <p><a href="https://i.stack.imgur.com/s4oD3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s4oD3.png" alt="enter image description here"></a></p>
  
  <p>The first works just fine, it triggers the steps described in <code>deploy.yaml</code> if anything is pushed to <code>dev/stage/prod</code>. But the second, although it accepts the RegExp and evaluates a preview of branches (notice you don't see the main branches):</p>
  
  <p><a href="https://i.stack.imgur.com/i33Er.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i33Er.png" alt="enter image description here"></a></p>
  
  <p>When the build gets triggered (yes, it is triggered automatically!), it fails:</p>
  
  <p><a href="https://i.stack.imgur.com/0q875.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0q875.png" alt="enter image description here"></a></p>
  
  <p>A bit of Googling tells me Go-lang (which supposedly is the back-end where this regexp is being evaluated here) does not support Lookahead in RegExp.</p>
  
  <p>How can I solve this problem?</p>