Searches for the specified string.
nFound = document.selection.Find( strFind, nFlags );
nFound = document.selection.Find( strFind, nFlags )
strFind
Specifies a string to search for.
nFlags
Specifies a combination of the following values:
| eeFindAround | Moves to the start of the document when reaches the end of the document. |
| eeFindBookmark | Sets bookmarks on lines where the string is matched. |
| eeFindCount | Counts the occurrences of the matched string. |
| eeFindNext | Searches downward from the cursor position. |
| eeFindPrevious | Searches upward from the cursor position. |
| eeFindReplaceCase | Matches cases. |
| eeFindReplaceEscSeq | Uses escape sequences. Cannot be combined with eeFindReplaceRegExp. |
| eeFindReplaceOnlyWord | Matches only whole words. |
| eeFindReplaceOpenDoc | Searches all open documents in the same frame window. |
| eeFindReplaceQuiet | Does not display a message on the status bar if no string is found. |
| eeFindReplaceRegExp | Uses a regular expression for the searched string. Cannot be combined with eeFindReplaceEscSeq. |
| eeFindSaveHistory | Saves the searched string for repeated search. |
Returns 1 if the searched string is found, or 0 if not found. However, if the eeFindCount flag is specified, the return value is the number of the occurrences of the matched string in the document. Nevertheless, it the searched string is not found from the cursor position toward the specified direction, the return value is 0 even it the matched string is found in the rest of the document.
Supported on EmEditor Professional Version 4.00 or later.
Send feedback on this topic to Emurasoft