RosettaCodeData/Task/Strip-control-codes-and-extended-characters-from-a-string/PowerShell/strip-control-codes-and-extended-characters-from-a-string-2.ps1
2026-04-30 12:34:36 -04:00

6 lines
289 B
PowerShell

$test = "$([char]9)Français."
"Original string : `"$test`""
"Control characters stripped : `"$($test | Remove-Character -Control)`""
"Extended characters stripped : `"$($test | Remove-Character -Extended)`""
"Control & extended stripped : `"$($test | Remove-Character)`""