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