title: pulling mixed letters and numbers
body: <pre><code>import pandas as pd      
  dataframe = pd.DataFrame({'Date':['This 1A1619 person BL171111 the A-1-24',
                                        'dont Z112 but NOT 1-22-2001',
                                        'mix: 1A25629Q88 or A13B ok'], 
                                'IDs': ['A11','B22','C33'],
                                }) 
  </code></pre>
  
  <p>I have the dataframe above. I want to extract the all the mixed letters and number strings (<code>1A1619</code>,<code>BL171111</code>, <code>Z112</code>, <code>1A25629Q88</code>, <code>A13B</code>)  . To do so, I tried to combine code from <a href="https://stackoverflow.com/questions/57661996/replace-words-and-strings-pandas">replace words and strings pandas</a> and  <a href="https://stackoverflow.com/questions/57650538/identify-letter-number-combinations-using-regex-and-storing-in-dictionary">identify letter/number combinations using regex and storing in dictionary</a>. My code looks like this</p>
  
  <pre><code>pat = r'(?&lt;!\S)(?:[a-zA-Z]+\d|\d+[a-zA-Z])[a-zA-Z0-9]*(?!\S)'
  dataframe['new'] = dataframe['Date'].str.extract(pat, expand=True)
  </code></pre>
  
  <p>But doing so gives me an error</p>
  
  <pre><code>ValueError: pattern contains no capture groups
  </code></pre>
  
  <p>I looked here <a href="https://stackoverflow.com/questions/54343378/pandas-valueerror-pattern-contains-no-capture-groups">pandas ValueError: pattern contains no capture groups</a> but I am still unsure how to alter my code so I can extract all the mixed letters and number strings (<code>1A1619</code>,<code>BL171111</code>, <code>Z112</code>, <code>1A25629Q88</code>, <code>A13B</code>) </p>
  
  <p>What can I do to my code </p>
  
  <pre><code>dataframe['new'] = dataframe['Date'].str.extract(pat, expand=True) 
  </code></pre>
  
  <p>to extract what I want? </p>