I have this code snippet:
$string = [System.IO.File]::ReadAllText($TempPath).Replace("String","")
[System.IO.File]::WriteAllText($TempPath, $string)
The problem is that this string ends on an unknown number. Is there a quick way to determine this number and replace it?
E.G.: String = Example1 || Example2