title: Extract form key value pairs form html page in python or parse html page
body: <p>I want to extract key value pairs of some form elements in a html page </p>
  
  <p>for example</p>
  
  <pre><code>name="frmLogin" method="POST" onSubmit="javascript:return validateAndSubmit();" action="TG_cim_logon.asp?SID=^YcMunDFDQUoWV32WPUMqPxeSxD4L_slp_rhc_rNvW7Fagp7FgH3l0uJR/3_slp_rhc_dYyJ_slp_rhc_vsPW0kJl&amp;RegType=Lite_Home"
  </code></pre>
  
  <p>while the original line is</p>
  
  <pre><code>&lt;form name="frmLogin" method="POST" onSubmit="javascript:return validateAndSubmit();" action="TG_cim_logon.asp?SID=^YcMunDFDQUoWV32WPUMqPxeSxD4L_slp_rhc_rNvW7Fagp7FgH3l0uJR/3_slp_rhc_dYyJ_slp_rhc_vsPW0kJl&amp;RegType=Lite_Home"&gt;
  </code></pre>
  
  <p>is there any method using which I can safely get the key and value pairs. I tried using splitting by spaces and then using '=' characters but string inside quotes can also have '='.</p>
  
  <p>is there any different kind of split method which can also take care of quotes?</p>