title: How to add a quantity condition to a regex without including the quantity into the matching group?
body: <p>I want to create a match only if an additional quantity condition is true.</p>
  
  <p>Example (which is fine):</p>
  
  <p>Regex: <code>-(START.*?)_\d+(?=-END)</code></p>
  
  <p>Input: <code>test-START_one_two_three_4-END</code></p>
  
  <p>Match Group1: <code>START_one_two_three</code></p>
  
  <p>Anyways I want to add an additional check that inside the group match, there should be <code>_{3,4}</code> characters. But not followed by each other directly.</p>
  
  <p>So I'd have to create an additional non-capturing group with <code>(?:...)</code>.
  What I tried: looking 4 times for <code>_*</code> until the <code>-END</code>:</p>
  
  <p><code>(?:(?:_[^_]*){4}-END)</code></p>
  
  <p>But adding this into the regex won't create a match anymore. Why?</p>
  
  <p><a href="https://regex101.com/r/MHzWBr/2" rel="nofollow noreferrer">https://regex101.com/r/MHzWBr/2</a></p>