Hi!
Maybe this link will help or give some idea or turn point:
replace-text-with-powershell.aspx
Change Text in a File with Powershell
I am looking to change the text of a specific line, but leave any remaining text within that file alone. Example:
Line 1 of file: Change Hey, how are you? to Hi, how are you?
I would like to change the Hey to Hi.
Line 2 of file: Hey, how are you?
No changes, leave it be.
Thanks to anyone for your help!
2 answers
Sort by: Most helpful
-
Chris 141 Reputation points
2021-04-24T12:32:00.067+00:00 -
Andreas Baumgarten 111.3K Reputation points MVP
2021-04-24T21:35:41.743+00:00 Looks like this is almost the question in a different thread;
https://learn.microsoft.com/en-us/answers/questions/369228/change-specific-text-in-a-file.htmlIt would be helpful to focus in one thread. I will close this one.
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten