title: Parsing and creating a dict python
body: <p>I would like to create a dict by parsing a string</p>
  
  <pre><code>&lt;brns ret = "Herld" other = "very"&gt;
  &lt;brna name = "ame1"&gt;
  </code></pre>
  
  <p>I would like to create a dict that has the following key-value pairs:</p>
  
  <pre><code>dict = {'brnsret': 'Herld', 
          'brnsother':'very',
          'brnaname':'ame1'}
  </code></pre>
  
  <p>I have a working script that can handle this:</p>
  
  <pre><code>&lt;brns ret = "Herld"&gt;
  &lt;brna name = "ame1"&gt;
  </code></pre>
  
  <p>my Code to generate the dict: </p>
  
  <pre><code>match_tag = re.search('&lt;(\w+)\s(\w+) = \"(\w+)\"&gt;', each_par_line)
  if match_tag is not None:
  
  
     dict_tag[match_tag.group(1)+match_tag.group(2)] = match_tag.group(3)
  </code></pre>
  
  <p>But how should I tweak my script to handle more than one attribute  pair in a tag? </p>
  
  <p>Thanks </p>