title: Extracting values from string in PowerShell (with Regex)
body: <p>I have the following file:</p>
  
  <pre><code>&lt;Mapping ServerPath="$/Test/Dev/test/sunday/project" LocalPath="$(SourceDir)\Test" Version="Latest" WorkspaceMappingType="Map"&gt;
  &lt;Mapping ServerPath="$/Test/Dev/test/aaa/project2" LocalPath="$(SourceDir)\Test\project" Version="Latest" WorkspaceMappingType="Map"&gt;
  &lt;Mapping ServerPath="$/Test/Dev/test/sunday/project/test" LocalPath="$(SourceDir)\Test-machine" Version="Latest" WorkspaceMappingType="Map"&gt;
  &lt;Mapping ServerPath="$/Test/Dev/test/besaide/monday" LocalPath="$(SourceDir)\Monday" Version="Latest" WorkspaceMappingType="Map"&gt;
  </code></pre>
  
  <p>I need to extract from each line these 2 values:</p>
  
  <pre><code>ServerPath="$/Path"
  
  LocalPath="$(SourceDir)\Path"
  </code></pre>
  
  <p>I have the file content in PS variable with this method:</p>
  
  <pre><code>$file = Get-Content C:\test\file.txt
  </code></pre>
  
  <p>Now how can I retrieve the 2 valus from each line with Regex? (or without Regex if it possible).</p>