Or a bit "safe" solution:
filter cleantxt {
if($_.extension -eq ".txt"){
$content = $_ | Get-Content |
Select-String -Pattern "date" |
%{$_ -replace "------------",""} |
%{$_ -replace "<======================================>",''}
Set-Content -Value $Content -Path $_.fullname
}
}