title: In Python, how do I remove from a list any element containing certain kinds of characters?
body: <p>Apologies if this is a simple question, I'm still pretty new to this, but I've spent a while looking for an answer and haven't found anything. I have a list that looks something like this horrifying mess: </p>
  
  <pre><code>['Organization name} ', '&gt; (777) 777-7777} ', ' class="lsn-mB6 adr"&gt;1 Address, MA 02114 } ', ' class="lsn-serpListRadius lsn-fr"&gt;.2 Miles} MORE INFO YOUR LISTING MAP if (typeof(serps) !== \'undefined\') serps.arrArticleIds.push(\'4603114\'); ', 'Other organization} ', '&gt; (555) 555-5555} ', ' class="lsn-mB6 adr"&gt;301 Address, MA 02121 } ', ' class="lsn-serpListRadius lsn-fr"&gt;.2 Miles} MORE INFO CLAIM YOUR LISTING MAP if (typeof(serps) !== \'undefined\') serps.arrArticleIds.push(\'4715945\'); ', 'Organization} ']
  </code></pre>
  
  <p>And I need to process it so that <a href="http://www.decalage.info/en/python/html" rel="noreferrer">HTML.py</a> can turn the information in it into a table. For some reason, HTML.py simply can't handle the monster elements (eg. 'class="lsn-serpListRadius lsn-fr">.2 Miles} MORE INFO YOUR LISTING MAP if (typeof(serps) !== \'undefined\') serps.arrArticleIds.push(\'4603114\'); ', etc).  Fortunately for me, I don't actually care about the information in the monster elements and want to get rid of them. </p>
  
  <p>I tried writing a regex that would match all more-than-two-letter all-caps words, to identify the monster elements, and got this:</p>
  
  <pre><code>re.compile('[^a-z]*[A-Z][^a-z]*\w{3,}')
  </code></pre>
  
  <p>But I don't know how to apply that to deleting the elements containing matches to that regex from the list. How would I do that/is that the right way to go about it?</p>