title: Convert Arraylist to string in powershell
body: <p>I am trying to grep some data from a variable:</p>
  
  <pre><code> Select-String -inputObject $patternstring  -Pattern $regex -AllMatches
   | % { $_.Matches } | % { $_.Value } -OutVariable outputValue
   Write-Host $outputValue
  </code></pre>
  
  <p>To the same outvariable, I am trying to do string manipulation</p>
  
  <pre><code>$outputValue.Substring(1,$outputValue.Length-2);
  </code></pre>
  
  <p>this fails stating that <strong>outputValue</strong> is an <code>ArrayList</code>. </p>
  
  <p>How can I convert an <code>Arraylist</code> to <code>String</code>? </p>