Progress
Language Reference


SEARCH( ) Method

Searches for a specified string in an editor widget starting from the current text cursor position.

Return Type: LOGICAL

Applies To: Editor

SYNTAX
SEARCH ( string , flag ) 

string

A character-string expression to search for. For the large editor widget in Windows, you can use wildcard characters for regular expression pattern matching. A question mark(?) in a particular position indicated that any single character is acceptable in that position. An asterisk (*) indicates that any group of characters is acceptable, including a null group of characters. If you want to specify a question mark (?) or asterisk (*) as a literal character rather than a wildcard character in the string, use ?? and ** respectively.

flag

An integer expression that specifies the type of search to be performed.

The flag expression determines what type of search to perform. Table 62 lists the flag values that correspond to each search type.

Table 62: SEARCH Flag Values 
Type of Search
Flag Value
FIND-NEXT-OCCURRENCE
1
FIND-PREV-OCCURRENCE
2
FIND-CASE-SENSITIVE
4
FIND-WRAP-AROUND
16
FIND-SELECT
32

For a single search operation, you cannot specify both FIND-NEXT-OCCURRENCE and FIND-PREV-OCCURRENCE. Any other combination of these flags is valid. To do multiple searches, you add the flag values. For example, you can specify FIND-PREV-OCCURRENCE and FIND-WRAP-AROUND by adding their flag values, 2 and 16, to get SEARCH(string, 18).

If the operation is successful, the method returns TRUE.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095