title: Reverse of String.Format?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1410012/parsing-formatted-string">Parsing formatted string.</a>  </p>
  </blockquote>
  
  <p>How can I use a <code>String.Format</code> format and transform its output to its inputs?</p>
  
  <p>For example:</p>
  
  <pre><code>string formatString = "My name is {0}.  I have {1} cow(s).";
  
  string s = String.Format(formatString, "strager", 2);
  
  // Call the magic method...
  ICollection&lt;string&gt; parts = String.ReverseFormat(formatString, s);
  // parts now contains "strager" and "2".
  </code></pre>
  
  <p>I know I can use regular expressions to do this, but I would like to use the same format string so I only need to maintain one line of code instead of two.</p>