![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Case-sensitive -replace command I am using the -replace command to replace tokens i some text files. However, -replace seems to act upon tokens that I do not wish to have replaced. For instance, the following command does not just replace the token 'Test', it also replaces 'TEST'. Get-Content file1.txt,file2.txt,file3.txt | % { $_ -replace 'Test', 'Test4' } How can I tell the -replace command to replace tokens in a case-sensitive way? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Case-sensitive -replace command -creplace Replace operator (case sensitive) help about_operator -- Kiron |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Case-sensitive -replace command Thanks Kiron, the -creplace operator did the trick. Thanks for pointing out the help topic about operators; I found a lot of useful stuff there that I never knew existed... "Kiron" wrote: Quote: > -creplace Replace operator (case sensitive) > > help about_operator > > -- > Kiron |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Problem with Case-Sensitive fieldnames | .NET General | |||
| Case-sensitive Keys and Strings | PowerShell | |||
| Re: replace method is case sensitive | PowerShell | |||
| Filesystem Still Case Sensitive After Uninstalling SUA | Vista General | |||
| Filesystem Still Case Sensitive After Uninstalling SUA | Vista General | |||