title: Extract value from text string using format string in python
body: <p>I have one format string and one input string, for example:</p>
  <pre><code>format_string = &quot;name=%s, age=%d&quot;
  input_string = &quot;name=username, age=100&quot;
  </code></pre>
  <p>Any suggestions on how can I extract the equivalent values of <code>%s</code> and <code>%d</code> in a neat way?</p>