You should be able to do this on windows using
cygwin.
This uses "sed", which is part of cygwin, so you shouldn't have to many problems, you just have to replace the "sed" with "c:\cygwin\bin\sed" or something to that effect (depending on where you installed it).
Thank you very much for the link.