Skip to content

CONTAINS Expression

CONTAINS tests whether one string contains another string.

Syntax

CONTAINS{haystack;needle}

The production implementation splits on the first semicolon and tests haystack.find(needle). Matching is case-sensitive. It returns 1 when the substring is found and 0 otherwise.

Examples

These examples already exist in ACE's tests or CLI reference material:

CONTAINS{autocard;car}      -> 1
CONTAINS{autocard;ars}      -> 0
CONTAINS{database;base}     -> 1