PowerShell:
Код:
$sSourceFile = "E:\Песочница\0333\Source.txt"
$sDestFile = "E:\Песочница\0333\Destination.txt"
Select-String -Path $sSourceFile -Pattern "^Количество: (?:\d{4,}|[6-9]\d{2,}|5(?:[^0]\d|\d[^0]))$" -Encoding Default |`
ForEach-Object -Process { $_.Line } | Out-File -FilePath $sDestFile -Encoding Default