Replaces a string in the document.
nFound = document.selection.Replace( strFind, strReplace, nFlags );
nFound = document.selection.Replace( strFind, strReplace, nFlags )
strFind
Specifies a string to search for.
strReplace
Specifies a string to replace with.
nFlags
Specifies a combination of the following values:
| eeFindReplaceCase | Matches cases. |
| eeFindReplaceEscSeq | Uses escape sequences. Cannot be combined with eeFindReplaceRegExp. |
| eeFindReplaceQuiet | Does not display a message on the status bar if no string is found. |
| eeFindReplaceOnlyWord | Matches only whole words. |
| eeFindReplaceRegExp | Uses a regular expression for the searched string. Cannot be combined with eeFindReplaceEscSeq. |
| eeReplaceSelOnly | Replaces only in the selection. |
| eeReplaceAll | Replaces all at once. |
| eeFindReplaceOpenDoc | Searches all open documents in the same frame window. |
Returns the number of replaced strings if eeReplaceAll is specified. Otherwise, returns 1 if found, or 0 if not.
Supported on EmEditor Professional Version 4.00 or later.
Send feedback on this topic to Emurasoft