Skip to main content

What is a "pattern" in the context of defining rules?

Question

When defining membership rules for cohorts or programs, there’s the ability to select an operator called “pattern”? What is a “pattern” in this case and can you give me examples?

Answer

The “pattern” is evaluated against the fnmatch PHP function (see https://www.php.net/manual/en/function.fnmatch.php).

For example, if you were storing a value in the “ID Number” field, and you wanted to create a cohort that only contains users who have a 5-digit id number (numeric characters only) and that started with '1', you would enter the following: 1[0-9][0-9][0-9][0-9]

image-20240627-161417.png

JavaScript errors detected

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

If this problem persists, please contact our support.