expression MATCHES patternThe 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.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.
FOR EACH Customer NO-LOCK WHERE Customer.Address MATCHES("*St"):DISPLAY Customer.Name Customer.Address Customer.City Customer.StateCustomer.Country.END.
Most character comparisons are case insensitive in ABL. By default, all characters are converted to uppercase prior to comparisons. However, you can define fields and variables as case sensitive (although it is not advised, unless strict ANSI SQL adherence is required). If the expression preceding the MATCHES keyword is a field or variable defined as case sensitive, the comparison is case sensitive. In a case-sensitive comparison “SMITH” does not equal “Smith”.
MATCHES converts a LONGCHAR variable value to -cpinternal prior to comparison. The variable must convert without error, or the AVM raises a run-time error.
The MATCHES function is double-byte enabled. Both the specified expression and pattern arguments can contain double-byte characters.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |