$htmltitle1 = "{Quit|Discontinue|Stop|Cease|Give Up} Tottenham Manager {HEY}"
$reg = "\{.*?\}"
$found = $htmltitle1 -match $reg
$spuntext = @()
If ($found)
{
([regex]$reg).matches($htmltitle1)
}
$matches (以下) を確認できますが、各一致を $spuntext 配列に抽出するにはどうすればよいでしょうか? 笑私はこれで何時間も頭をぶつけて、さまざまなことを試してきました。
Groups : {{Quit|Discontinue|Stop|Cease|Give Up}}
Success : True
Captures : {{Quit|Discontinue|Stop|Cease|Give Up}}
Index : 0
Length : 37
Value : {Quit|Discontinue|Stop|Cease|Give Up}
Groups : {{HEY}}
Success : True
Captures : {{HEY}}
Index : 56
Length : 5
Value : {HEY}
Key : 0
Value : {Quit|Discontinue|Stop|Cease|Give Up}
Name : 0