Logical string expressions

A logical string expression is the comparison of two strings using one of the following logical operators:

The two strings are compared character by character until the condition is satisfied. If the strings do not match in length, the shorter one is padded with blanks to yield equal lengths. The comparison is not case sensitive, so the strings "abc" and "aBc" are considered to be the same. The two strings in the expression may be:

For example, if a string variable called ANSWER is set to "NO" then the statement,

if (answer <> "YES") print "SUCCESS"

will result in the condition evaluating to TRUE and the print statement to be executed.

A string expression can also be used to compare a string with a logical expression using the following operator:

In this case, the string on the right side of the "~=" operator is interpreted as a regular expression. A regular expression is a way to represent a set of strings in a compact way using a pattern. At the current time, regular expressions in EASI only support single-character wildcard matching (using the "?" character), and multicharacter wildcard matching (using the "*" character). For example, the comparison in the statement

if ( filename ~= "set?.pix" ) print "success"

will evaluate to true if filename matches the pattern "set?.pix" with any character substituted for the wildcard character "?", such as:

However, it will evaluate to false if filename is,

or any other string that doesn't match the pattern. Similarly, the comparison in the statement,

if ( filename ~= "*.pix" ) print "success"

will evaluate to true of if the variable filename matches the pattern "*.pix" where any characters are substituted for the wildcard character "*", such as:

In the latter case, the "*" has been substituted with the empty string"".

Regular expressions may include any number of wildcard characters. If the characters "?" or "*" need to be used in the regular expression, but not as wildcards but as themselves, then they must be preceded by the escape character "\".

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.