There are three ways to replace text in RTextDoc:
The Replace Dialog will appear, allowing you to enter the text to search for and the text to replace with.
For a tutorial on searching with regular expressions in RTextDoc, please see Using Regular Expressions.
See also: Find, Find Next, Replace Next