|
Re: More text processing. Another way to solve this problem:
gc a.txt | % { "DSC`tRLI"; "------`t-----" } { if ($_ -match '^DSC') {
$out = [regex]::split($_, '\s+')[1];
}
elseif ($_ -match '^RLI' ) {
$out + "`t" + [regex]::split($_, '\s+')[1]
}
}
Best wishes!
Tao Ma |