get-content C:\temp\pinput.txt -Encoding UTF8 | Set-Content c:\temp\poutput.txt
I believe the output from this command retains the single quote but removes all other special characters.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there,
On executing the below script with the attached input file, looking for help to remove the special characters. How to remove them but single quotes need to be the same. You could see some special characters in output line 9,10,11,12
output
["Continental District – Denver", "Org Unit"],
["The Team Lead’**s Roadmap", "Org Unit"], --<<The single quotes in the word Lead's need to be retained>>
["Data ServicesÂ** - ABC", "Stem Face"],
["App tttm - CST", "Stem Face"],
script used
$file = Get-Content -Path "C:\temp\pinput.txt" -Raw
$file = $file -ireplace '(?<match1>[\"[^]])\r\n(?<match2>[^]]\"])','${match1}${match2}'
$file |Out-File -FilePath "C:\temp\oput.txt"
155372-pinput.txt
Thanks.
get-content C:\temp\pinput.txt -Encoding UTF8 | Set-Content c:\temp\poutput.txt
I believe the output from this command retains the single quote but removes all other special characters.