Progress
Language Reference


MATCHES Operator

Interfaces
OS
SpeedScript
All
All
Yes

Compares a character expression to a pattern and evaluates to a TRUE value if the expression satisfies the pattern criteria.

SYNTAX

expression MATCHES pattern 

expression

A character expression that you want to check to see if it conforms with the pattern.

pattern

A character expression that you want to match with the string. This can include a constant, field name, variable name, or expression whose value is a character.

The pattern can contain wildcard characters: a period (.) in a particular position indicates 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.

EXAMPLE

This procedure displays customer information for all customers whose address ends in St. The procedure does not use an index for the customer search in r-match.p.

r-match.p
FOR EACH customer WHERE address MATCHES("*St"):
  DISPLAY name address city state country.
END. 

NOTES

SEE ALSO

BEGINS Operator


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