Skip to main content
Skip table of contents

like Operator

Syntax

aString like "regExpPattern";

Semantics

Returns true if regExpPattern matches aString, otherwise false.

Substitutables

"regExpPattern"

Can be a literal like "abc" or any other regular expression. Regular Expressions provides an overview of regular expression syntax. "regExpPattern" must be enclosed in double quotes. An introduction into regular expressions can be found at http://www.regular-expressions.info/

Examples

The example below assigns the boolean result of the relational expression with like operator to variable b1. The expression evaluates to true if the string s1 equals "abc".

NONE
set b1 = s1 like "abc";

The example below assigns the boolean result of the relational expression with like operator to variable b2. The expression evaluates to true if the string s2 contains at least one letter and only lower case letters.

CODE
set b2 = s2 like "[a-z]+";

Related Documentation:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.