更新时间:2022-10-18 10:50:49
由于PowerShell的2,简单:
$收件人= $地址-split;
I have a string that has emails separated by semi-colon
$address = "foo@bar.com; boo@bar.com; zoo@bar.com"
How can I split this into an array of strings that would result as:
[string[]]$recipients = "foo@bar.com", "boo@bar.com", "zoo@bar.com"
As of powershell 2, simple:
$recipients = $addresses -split "; "