title: How to find URL containing one word AND another using re in Python?
body: <p>Say I have two types of links in a html file. I want to filter out all links with type 1. How would I do it in Python using the <code>re</code> module?</p>
  
  <p>Type 1:</p>
  
  <pre><code>http://www.domain.com/firstlevel/02-02-13/secondlevel-slug.html
  </code></pre>
  
  <p>Type 2:</p>
  
  <pre><code>http://www.domain.com/levelone/02-02-13/secondlevel-slug.html
  </code></pre>
  
  <p>I want to find all links that contain both <code>firstlevel</code> AND <code>secondlevel</code>.</p>
  
  <p>This is how I tried it:</p>
  
  <pre><code>import re
  text = "here goes the code with various links of type 1 and type 2…"
  findURL = re.findall('.*firstlevel.*secondlevel.*',text)
  </code></pre>
  
  <p>Here is what I thought the regex means:</p>
  
  <pre><code>find all strings that has ONE OR MORE occurances of ANY CHARACTER 
  followed by the word firstlevel 
  followed by ONE OR MORE occurances of ANY CHARACTER
  followed by the word secondlevel 
  followed by ONE OR MORE occurances of ANY CHARACTER
  </code></pre>
  
  <p>However I get an empty list as result.</p>
  
  <p>What do I do wrong?</p>