Pull values separately returned by regular expression

In the Below script, the regular expression is returning the value “Environment_Server Environment_OTF Environment_MPU” to the variable “$token_name” (the value doesnt contain double quotes and includes spaces). Now, how can I pull each word seprately from the above value and print it? I mean, the above value contains 3 words, i want to print the 3 words one by one. Please help.

$num = 0
$Count2 = 2
while($num -le $Count2)
{
$token_name = @([regex]::matches($line,$tokenrep)| sort| get-unique)
$array_list = $token_name[$num -1]
write-host “the values are” $array_list
$num = $num + 1
}

When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance

If I got it right you you use -split to split the input string at a certain character. In this case you could split it on the space character.

There might be a better of achieving what you need. You may elaborate a little more detailed what you want to do … the bigger picture …