title: Get key value from string using Powershell
body: <p>I am trying to get key value using Regex in powershell.</p>
  
  <pre><code>$string = "key1:value1,key2:value2,key3:value3"
  $name = [Regex]::Matches($string, ':([^/]+),') | Select -ExpandProperty Value
  Write-Host "Name :" $name
  </code></pre>
  
  <p>I want output like this :</p>
  
  <pre><code>$key1 = "value1"
  $key2 = "value2"
  $key3 = "value3"
  </code></pre>
  
  <p>Output i am getting :</p>
  
  <pre><code>Name : :value1,key2:value2,
  </code></pre>