I am trying to replace a section of code within a series of php files. I open the files, read the contents into a "sourcecode" variable and locate a section of code. I then capture this section in a variable like this:
phpsection=sourcecode[phpstart+2:phpend]
The problem is after I locate this section with the find function, I want to replace the entire section with a string. How do I go about replacing the entire section?