Regex Examples and Search Logic

Technical Articles

Solution
Application
Content Type
Technical Documentation
Utilities & Services
ft:locale
en-US

Example 1

ObjectiveExample ValuesSearch CriteriaValues Returned
Find all buildings that end with a number

Building
Building 1
Building 2
Building 3
Building A

Criteria: "Building"
Operator: "matches regex"
Value: ^.+?\d$

Building 1
Building 2
Building 3

Example 2

ObjectiveExample ValuesSearch CriteriaValues Returned
Find all devices in all labs, excluding faculty machines

LAB-ART-101
LAB-CS-101
LAB-CS-102
Professor Smith's iPad
Professor Johnson's iPad

Criteria: "Display Name"
Operator: "matches regex"
Value: ^LAB-.*$

LAB-ART-101
LAB-CS-101
LAB-CS-102

Example 3

ObjectiveExample ValuesSearch CriteriaValues Returned
Find all devices that do not start with the word "Professor"

Professor Smith's iPad
Professor Johnson's iPad
iPad - Professor Jones
iPhone for Professor Davis

Criteria: "Display Name"
Operator: "does not match regex"
Value: ^Professor

iPad - Professor Jones
iPhone for Professor Davis