PS C:\> $a = "AC134","DE432","SX889" PS C:\> $a AC134 DE432 SX889 PS C:\> $a | %{ $_.GetEnumerator() | %{$b = ""} { if( $_ -cmatch '^[A-Z]$' ) { $b += "{0,2:00}" -f ([int]$_ - [char]'A')} else { $b += $_ } } {$b} } 0002134 0304432 1823889 |
欢迎光临 批处理之家 (http://www.bathome.net/) | Powered by Discuz! 7.2 |