read the file in and write it out and use join() split() to replace the text.