Hello I have a script that searches for a matching string, then replace it
I want to replace all occurrence of "6.0.0.0.2010 Wave Embedded 6.0 (2010)" with "6.0.0.0.XXXX Wave Embedded 6.0 (XXXX)"
I want to match strings that match exactly that, however if i modify the 6.0.0.0.XXXX then it deletes everything after that..
my script :
(Get-Content C:\Users\gadmin\Desktop\temp\test.txt) | ForEach-Object { $_ -replace '6.0.0.0.*$', '6.0.0.0.XXXX' } | Set-Content C:\Users\gadmin\Desktop\temp\test1.txt
"Embedded 6.0 (2010)" | % { $_ -replace "^Embedded 6.0.*$", "Embedded 6.0 (XXXX)" }