title: Replace the content of a textfile with a regex in powershell
body: <p>I have a simple textfile and I need a powershell script to replace some parts of the file content.</p>
  
  <p>My current script is the following:</p>
  
  <pre><code>$content = Get-Content -path "Input.json"
  
  $content -Replace '"(\d+),(\d{1,})"', '$1.$2' |  Out-File "output.json"
  </code></pre>
  
  <p>Is it possible to write it in one line without the content variable, like this?</p>
  
  <pre><code>Get-Content -path "Input.json" | ??? -Replace '"(\d+),(\d{1,})"', '$1.$2' |  Out-File "output.json"
  </code></pre>
  
  <p>I don't know how I can use the output of the first get-content commandlet in the second command without the $content variable? Is there an automatic powershell variable </p>
  
  <p>Is it possible to do more replacements than one in a pipeline.</p>
  
  <pre><code>Get-Content -path "Input.json" | ??? -Replace '"(\d+),(\d{1,})"', '$1.$2' | ??? -Replace 'second regex', 'second replacement' |  Out-File "output.json"
  </code></pre>