title: Using Python regex to sanitize input string
body: <p>I have the string:
  text = <code>'href = "www.google.com" onmouseover = blahblah &gt;'</code>
  I want <code>'href = "www.google.com"&gt;'</code></p>
  
  <p>Currently, my function looks like this:</p>
  
  <pre><code>text = re.sub(r'href = \".*\".*&gt;', 'href = \".*\"&gt;', text)
  </code></pre>
  
  <p>which ends up removing the website link and replacing it with the string '.*' .  I think I'm supposed to use ?Pname somehow?, but do not know ho to write it properly so that I get the correct output.</p>