With a quick search you should be able to find a distribution of GNU utilities for Windows.
As a specific tool for your use case I would suggest the Windows compiled version of sed. https://www.gnu.org/software/sed/sed.html
The full list of GNU utilities (https://www.gnu.org/software/software.html) includes many other desirable utilities, such as bash, coreutils, emacs, gawk, gcc, grep, groff, sed, tar, wdiff, and wget.