title: How to split a string into an array
body: <p>I have a string of attribute names and definitions.
  I am trying to split the string on the attribute name, into a Dictionary of string string. Where the key is the attribute name and the definition is the value. I won't know the attribute names ahead of time, so I have been trying to somehow split on the ":" character, but am having trouble with that because the attribute name is is not included in the split.</p>
  
  <p>For example, I need to split this string on "Organization:", "OranizationType:", and "Nationality:" into a Dictionary. Any ideas on the best way to do this with C#.Net?</p>
  
  <blockquote>
    <p>Organization: Name of a governmental, military or other organization. OrganizationType: Organization classification to one of the following types: sports, governmental military, governmental civilian or political party. (required) Nationality: Organization nationality if mentioned in the document. (required)</p>
  </blockquote>
  
  <hr>
  
  <p>Here is some sample code to help:</p>
  
  <pre><code>private static void Main()
  {
      const string str = "Organization: Name of a governmental, military or other organization. OrganizationType: Organization classification to one of the following types sports, governmental military, governmental civilian or political party. (required) Nationality: Organization nationality if mentioned in the document. (required)";
  
      var array = str.Split(':');
      var dictionary = array.ToDictionary(x =&gt; x[0], x =&gt; x[1]);
  
      foreach (var item in dictionary)
      {
          Console.WriteLine("{0}: {1}", item.Key, item.Value);
      }
  
      // Expecting to see the following output:
  
      // Organization: Name of a governmental, military or other organization.
      // OrganizationType: Organization classification to one of the following types sports, governmental military, governmental civilian or political party.
      // Nationality: Organization nationality if mentioned in the document. (required)
  }
  </code></pre>
  
  <hr>
  
  <p>Here is a visual explanation of what I am trying to do:</p>
  
  <p><a href="http://farm5.static.flickr.com/4081/4829708565_ac75b119a0_b.jpg" rel="nofollow noreferrer">http://farm5.static.flickr.com/4081/4829708565_ac75b119a0_b.jpg</a></p>