I know this topic has been widely discussed here, but I am newbie on PowerShell and facing some hurdles to replace a symbol in the table.
In the picture below there some symbols "-" in the numeric column "PRECOMEDIODISTRIBUICAO".
I ran the following code in order to replace such symbols to "0" number:
$file = Import-Csv -Path $file -Delimiter "`t" |
Select PRECOMEDIODISTRIBUICAO | ForEach {$_ -Replace "\?_", 0}
But got the following result:
I tried different ways to replace "-" symbol to 0, but got no success. For example: "-", "- ", "\ - " , " - " generated no correction.
Do you have a better idea how to replace such string?


-Replace '\-', '0'-character, why are you replacing\?_?