|
|
@ -11,9 +11,10 @@ |
|
|
|
if ($Str -match $_ -and($key)) { |
|
|
|
if ($Str -match $_ -and($key)) { |
|
|
|
$Result = @{ |
|
|
|
$Result = @{ |
|
|
|
$key = $Matches[$key] |
|
|
|
$key = $Matches[$key] |
|
|
|
anchor = $Matches[0] |
|
|
|
# 將錨定字串中的特殊字元轉換為一般字串 |
|
|
|
|
|
|
|
Anchor = $Matches[0] -replace "([\[\]\(\)])", '\$1' |
|
|
|
} |
|
|
|
} |
|
|
|
$LR = $Str -split $Result["anchor"] |
|
|
|
$LR = $Str -split $Result["Anchor"] |
|
|
|
$Result.Add("L", $LR[0]) |
|
|
|
$Result.Add("L", $LR[0]) |
|
|
|
$Result.Add("R", $LR[1]) |
|
|
|
$Result.Add("R", $LR[1]) |
|
|
|
$Result |
|
|
|
$Result |
|
|
|