title: Get a regex expression for a key value pair separated by comma
body: <p>I would like to get the regex expression for a key-value pair separated by comma.</p>
  
  <p>input: "tag.Name:test,age:30,name:TestName123"</p>
  
  <p>This is my attempt so far</p>
  
  <pre><code>string pattern = @".*:.*" 
  </code></pre>
  
  <p>(I guess that .* indicates anything multiple times, followed by : and again anything multiple times, if I include a comma at the end ,*  </p>
  
  <p><code>string pattern = @".*:.*,*"</code></p>
  
  <p>I assume is the same thing, but it didn't work for me, the final result can be accomplish with Linq but I would like to not parse the input</p>
  
  <p>A sample of my output</p>
  
  <p><strong>INPUT</strong></p>
  
  <pre><code>string input = "tags.tagName:Tag1,tags.isRequired:false"
  var finaRes = input.Split(',').Select(x =&gt; x.Split(':')).Select(x =&gt; new { Key = x.First(), Value= x.Last()});
  </code></pre>
  
  <p><strong>OUTPUT:</strong></p>
  
  <pre><code>Key              Value
  ---------------|-------
  tags.tagName   |  Tag1 
  tags.isRequired|  false 
  </code></pre>