title: Capturing multiple groups in a regex does not return any result
body: <p>I have a python function </p>
  
  <pre><code>def regex(series, regex):
      series = series.str.extract(regex)
      series1 = series.dropna()
      return (series1)
  </code></pre>
  
  <p>Aim to match the regex with the pattern as below:</p>
  
  <ul>
  <li><p>anything with 'no' followed by (group of words) or a 'not' should not be matched. Below is the regex used in a python function:</p>
  
  <p><code>result = regex(df['col'],r'(^(?!.*\bno\b.*\b(text|sample text )\b)(?!.*\b(text|sample text)\b .*not).+$)')</code></p></li>
  </ul>
  
  <p>I do not get any results (just an empty data frame)when applying the regex in a function, <a href="https://i.stack.imgur.com/ENMhn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ENMhn.png" alt="enter image description here"></a></p>
  
  <p>but testing the regex in this link works well <a href="https://regex101.com/r/Epq0Ns/21" rel="nofollow noreferrer">https://regex101.com/r/Epq0Ns/21</a></p>