Searches a TextBuffer for a specified string.
Syntax
Function Find(Target As String, StartLine As Long, StartColumn As Long, EndLine As Long, EndColumn As Long, [WholeWord As Boolean = False], [MatchCase As Boolean = False], [PatternSearch As Boolean = False]) As Boolean
This syntax has these parts:
Part | Description |
Target | Required String containing the text or pattern you want to find. |
StartLine | Required Long value specifying the line at which you want to start the search; will be set to the line of the match if one is found. The first line is number 1. |
StartColumn | Required Long specifying the column at which you want to start the search; will be set to the column containing the match if one is found. The first column is 1. |
EndLine | Required Long specifying the last line of the match if one is found. The last line may be specified as -1. |
EndColumn | Required Long specifying the column at which you want to end the search. The last column may be designated as -1. |
WholeWord | Optional Boolean value specifying whether to only match whole words. If True, only matches whole words. False is the default. |
MatchCase | Optional Boolean value specifying whether to match case. If True, the search is case sensitive. False is the default. |
PatternSearch | Optional Boolean value specifying whether or not the target string is a regular expression pattern. If True, the target string is a regular expression pattern. False is the default. |
Remarks
Find returns True if a match is found and False if a match isn't found. The MatchCase and PatternSearch arguments are mutually exclusive; if both arguments are passed as True, an error occurs. The content of the Find dialog box isn't affected by the Find method. The specified range of lines and columns is inclusive, so a search can find the pattern on the specified last line if EndColumn is supplied as -1 or the length of the line.