You can overwrite text with a specified text segment, using the
overwrite segment syntax; for example:
response to ...
add to NewTxt
overwrite segment 3 1 thru 10 4 from OldTxt
After execution, the text cursor is on the character immediately following the last overwritten character.
If the text cursor is at the column after the last character in a line, an overwrite segment statement is performed as if it were an insert statement, and the line is extended. Color attributes are preserved in segments from a colored textual region that are used for overwriting text. If the segment is colored but the destination textual region is not, then the color attributes will be dropped. If the segment is not colored, but the destination textual region is colored, the characters in the segment inherit the attributes of the text they overwrite.
Line breaks within the segment are retained. That is, when the segment contains more than one line of text, each line overwrites the textual region as if the end of each line was a newline character (\n).