SMATCH_MEMO Function

Syntax

Result_Flag as L = SMATCH_MEMO(C memofield,C pattern)

Arguments

memofield

The memo field to examine for an occurrence of Find_String. Character

pattern

A character string. The pattern must include wildcard characters: * and ?

Description

Returns TRUE if the specified pattern is found in the entire memo.

Discussion

Searches within the text of a Memo field. Returns .T. (TRUE) if pattern is found in the memo field memofield. The field being searched cannot be a Rich Text Memo field. SMATCH_MEMO is useful for selecting records using query selection criteria, filter expressions, or conditional expressions, such as: CITY = "Boston" .and. smatch_memo("COMMENTS", "*rent*") Find_String must include the standard wildcard characters * or ? , as described for the function LIKE(). SMATCH_MEMO() is case insensitive (unlike LIKE() and SMATCH() , which are case sensitive).

Example

smatch_memo("COMMENTS", "*rent*") -> TRUE, if the field COMMENTS contains any of the following text: " rent", "rental", "current", "Rent".

See Also