I am doing a string replacement in PowerShell. I have no control over the strings that are being replaced, but I can reproduce the issue I\'m having this way:
Instead of using the -replace operator, you can use the .Replace() method like so:
PS> 'word'.Replace('word','@#$+')
@#$+
The .Replace() method comes from the .NET String class whereas the -Replace operator is implemented using System.Text.RegularExpressions.Regex.Replace().
More info here: https://vexx32.github.io/2019/03/20/PowerShell-Replace-Operator/