|
|
@ -6,8 +6,11 @@ |
|
|
|
# Regex 可輸入複數個 |
|
|
|
# Regex 可輸入複數個 |
|
|
|
Write-Host $Str |
|
|
|
Write-Host $Str |
|
|
|
$Regex | % { |
|
|
|
$Regex | % { |
|
|
|
$key = if ($_ -match "\(\?\<(.*?)\>") { $Matches[1] } |
|
|
|
$key = if ($_ -match "\(\?\<(.*?)\>") { |
|
|
|
if (-not($key)) { Write-Error "$_ 沒有定義(?<TAG>)" } |
|
|
|
$Matches[1] |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
Write-Error "$_ 沒有定義(?<TAG>)" |
|
|
|
|
|
|
|
} |
|
|
|
if ($Str -match $_ -and($key)) { |
|
|
|
if ($Str -match $_ -and($key)) { |
|
|
|
$Result = @{ |
|
|
|
$Result = @{ |
|
|
|
$key = $Matches[$key] |
|
|
|
$key = $Matches[$key] |
|
|
|