I am trying to access all matches of my first capture group ([^ ]+) in an array so I can foreach it, however I don't see it in the output:
$input = "Row 1:
Computer: xxx
Last Heartbeat: 4/9/2020 11:27:24 AM
Row 2:
Computer: yyy
Last Heartbeat: 4/9/2020 11:27:37 AM"
$matches = ([regex]'Computer: ([^ ]+)').Matches($input)
$matches
Yields:
Groups : {0, 1}
Success : True
Name : 0
Captures : {0}
Index : 7
Length : 13
Value : Computer: xxx
Groups : {0, 1}
Success : True
Name : 0
Captures : {0}
Index : 66
Length : 13
Value : Computer: yyy
Admittedly I have a lot to learn about the data structures and how to access them.