I have a text file with areas that I want to edit online and other areas that I do not. The editable areas begin and end with <!-- editarea name="areaname" -->.
I want to open the file and read just the editable area into a <textarea>, be able to edit the text, and then save the file back with the edits.
What is the best way to go about this? (I'm familiar about reading/writing files, just not about editing them.)