title: Get list of Booleans corresponding to list of multiple-and-duplicate regex patterns
body: <p>Given a list of regex patterns <strong>that includes duplicate patterns</strong> and a single input string.  </p>
  
  <p>How can I get a Booleans list (with the same length as input list of regex patterns) where each Boolean corresponds to whether or not a regex pattern (at the same index) from the regex list matched the input string? </p>
  
  <p>I want to do this for each string in a pandas Series or DataFrame column.</p>
  
  <p>The following code <em>almost</em> does exactly what I want, but it does not match the second (or n'th) occurrence of a duplicate regex pattern, only the first.</p>
  
  <p>I want to avoid solutions that use a for loop.</p>
  
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  
  a = pd.Series([
      'one two three four five six seven', 
      'seven six five four three two one twenty ten'])
  
  # list of regex patterns (note: 'one' is duplicated)
  pattern_list = ['three', 'one', 'no_match', 'not_in', 'five', 'one']
  pattern_single = '(' + ')|('.join(pattern_list) + ')'
  
  pattern_single
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>'(three)|(one)|(no_match)|(not_in)|(five)|(one)'
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>((~a.str.extractall(pattern_single).isna())
      .reset_index()
      .groupby('level_0').agg('sum')
      .drop(columns='match')
      .values.tolist())
  </code></pre>
  
  <pre class="lang-none prettyprint-override"><code>[[True, True, False, False, True, False],
   [True, True, False, False, True, False]]
  </code></pre>
  
  <p>when what I want is:</p>
  
  <pre class="lang-none prettyprint-override"><code>[[True, True, False, False, True, True],
   [True, True, False, False, True, True]]
  </code></pre>
  
  <hr>
  
  <p>I have tried wrapping each <code>&lt;pattern&gt;</code> separated by <code>|</code> with <code>((?&lt;![\w\d])&lt;pattern&gt;(?![\w\d]))</code> which produces the same results.</p>
  
  <p>I have tried wrapping each <code>&lt;pattern&gt;</code> with <code>((?=.*&lt;pattern&gt;))</code> with and without the separating <code>|</code> which does not capture anything.</p>
  
  <p>I have also tried using naming each of the groups as below: same results.</p>
  
  <pre class="lang-py prettyprint-override"><code>pattern_list = ['&lt;{}&gt;{}'.format(chr(k+97), v) for k,v in enumerate(pattern_list)]
  pattern_single = '(?P' + ')*|(?P'.join(pattern_list) + ')'
  
  pattern_single
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>'(?P&lt;a&gt;three)*|(?P&lt;b&gt;one)*|(?P&lt;c&gt;no_match)*|(?P&lt;d&gt;not_in)*|(?P&lt;e&gt;five)*|(?P&lt;f&gt;one)'
  </code></pre>