title: How to extract an IP address from an HTML string?
body: <p>I want to extract an IP address from a string (actually a one-line HTML) using Python.</p>
  
  <pre><code>&gt;&gt;&gt; s = "&lt;html&gt;&lt;head&gt;&lt;title&gt;Current IP Check&lt;/title&gt;&lt;/head&gt;&lt;body&gt;Current IP Address: 165.91.15.131&lt;/body&gt;&lt;/html&gt;"
  </code></pre>
  
  <p>-- '165.91.15.131' is what I want!</p>
  
  <p>I tried using regular expressions, but so far I can only get to the first number.</p>
  
  <pre><code>&gt;&gt;&gt; import re
  &gt;&gt;&gt; ip = re.findall( r'([0-9]+)(?:\.[0-9]+){3}', s )
  &gt;&gt;&gt; ip
  ['165']
  </code></pre>
  
  <p>But I don't have a firm grasp on reg-expression; the above code was found and modified from elsewhere on the web.</p>