title: Python: re.find longest sequence
body: <p>I have a string that is randomly generated:</p>
  
  <pre><code>polymer_str = "diol diNCO diamine diNCO diamine diNCO diamine diNCO diol diNCO diamine"
  </code></pre>
  
  <p>I'd like to find the longest sequence of "diNCO diol" and the longest of "diNCO diamine".  So in the case above the longest "diNCO diol" sequence is 1 and the longest "diNCO diamine" is 3.</p>
  
  <p>How would I go about doing this using python's re module?</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT: <br>
  I mean the longest number of repeats of a given string.  So the longest string with "diNCO diamine" is 3: <br>
  diol <b>diNCO diamine diNCO diamine diNCO diamine</b> diNCO diol diNCO diamine</p>