Browse Source

Get-NameRegex: finish anchor split file name, and return Hash object.

temp1
pcnick 3 years ago
parent
commit
c38a1e7917
  1. 5
      NameRegex.ps1

5
NameRegex.ps1

@ -11,9 +11,10 @@
if ($Str -match $_ -and($key)) {
$Result = @{
$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("R", $LR[1])
$Result

Loading…
Cancel
Save