Skip to content

Instantly share code, notes, and snippets.

@KevinMarquette
Created September 7, 2019 06:40
Show Gist options
  • Save KevinMarquette/8f0d55a49833a0fc5941b8d98500a016 to your computer and use it in GitHub Desktop.
Save KevinMarquette/8f0d55a49833a0fc5941b8d98500a016 to your computer and use it in GitHub Desktop.
$path = 'D:\Games\Blizzard\World of Warcraft\_classic_\Interface\AddOns\ISBoxer\ISBoxer.toc'
$data = Get-Content $path
$properties = @{}
$pattern = '## (?<propertyName>[^:]*): (?<propertyValue>.*)'
foreach($line in $data)
{
if($line -match $pattern)
{
$properties[$Matches.propertyName] = $Matches.propertyValue
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment