title: How to use non-capturing parenthesis to capture a word or nothing at all?
body: <p>I am looking to use two variations of the same step I'm my ATDD test using cucumber-jvm</p>
  
  <blockquote>
    <p>Then order passes quantity limits</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>Then order passes limits</p>
  </blockquote>
  
  <p>This will read better with different scenarios. I have tried various variations of the following:</p>
  
  <pre><code>@Then(value = "^order passes (?: | quantity )limits$")
  public void verifyCreditPassed(){ 
      //Assert stuff
  }
  </code></pre>
  
  <p>Can anyone help?</p>
  
  <p>Thanks</p>