title: Unable to display multiple captures from same group of each line in powershell
body: <p>So the powershell script works accurately if the regex matches only one entry each line in the masterfile, but if more than one entry matches in each line the output is not what is expected. I am using this:- </p>
  
  <pre><code>$FILE_RE = '^[^\:]*[^\.txt:]'
  $TEXT_RE = '"(.*?)"'
  $TEXT = (Get-Content .\masterfile.txt).ToUpper() |
                  ForEach-Object { 
                      New-Object psobject -Property @{
                          fileName = [regex]::Matches($_, $FILE_RE).Value
                          Value = [regex]::Matches($_, $TEXT_RE).value 
                      }
                  }
           $TEXT | Select-Object  fileName , Value |  Sort-Object * -Unique |
           Export-Csv   TEXT.CSV -NoTypeInformation`
  </code></pre>
  
  <p>The data of the file and corresponding regex <a href="https://regex101.com/r/Ip9RBW/3" rel="nofollow noreferrer">can be found here.</a>
  The output in Value tab consist <strong>System.Object[]</strong> which has 2 values. How i can have all the entries displayed which are inside <strong>System.Object[]</strong> with its corresponding file name in the first column.
  The intended output is:-</p>
  
  <pre><code>fileName    Value
  FILE1.TXT   VALUE1
  FILE1.TXT   VALUE2
  FILE2.TXT   VALUE3
  FILE2.TXT   TEST STRING1
  FILE3.TXT   VALUE4
  FILE3.TXT   3456789
  FILE4.TXT   VALUE5
  FILE4.TXT   TEXT1
  FILE5.TXT   VALUE6
  FILE5.TXT   LOREM IPSUM
  FILE6.TXT   VALUE7
  </code></pre>