Edit a .txt document and save it

a few months ago i made a news system nothing fancy just ad news to file thingy… but now i need to create something to edit the newsfile (news.txt) en save the edited file… can someone profide mee with a tutorial… or help me with a script… :smiley: