LogoLogo
WebsiteDocumentationChangelogStatusTerms
  • Getting Started
    • Overview
    • FAQs
    • Reference
      • Identifier Types
      • Identifier Profiles
      • Identity Clusters
      • Identity Resolution
      • Regular Expressions
      • Tabular Data Schema
      • Advanced Query Interface
      • IP Allowlisting
    • Global Data Regulations
  • Data
    • Sources
      • Amazon S3
      • API Source
      • Azure Blob Storage
      • BigQuery
      • Databricks
      • File Upload
      • Google Cloud Storage
      • Mailchimp
      • SDK Sources
        • Android SDK
        • iOS SDK
        • JavaScript SDK
      • SendGrid
      • Shopify
      • Snowflake
    • Data Configuration
      • Custom Identifiers
      • Traits
      • Events
      • Labels
  • Identity
    • EIDs Switchboard
  • Audiences
    • Audiences
      • Audience Builder
      • Insights
      • Activation
        • Real-Time Targeting
        • Google Ad Manager
        • Permutive
      • Exports
        • Metadata file
    • Destinations
      • Amazon DSP
      • Amazon S3
      • Azure Blob Storage
      • Campaign Manager 360
      • Display & Video 360
      • Google Ads
      • Google Cloud Storage (GCS)
      • Meta Ads
      • The Trade Desk
      • TikTok
      • Yahoo! Japan Ads
  • collaborate
    • Clean Rooms
      • Insights Clean Rooms
      • Activation Clean Rooms
      • Augmentation Clean Rooms
      • Prospecting Clean Rooms
    • Partnerships
      • Flash Partners
        • Optable Flash Node
        • AWS Connector
        • Snowflake Connector
      • Enterprise Partners
      • Flash Partner Settings
  • Differential Privacy
  • Admin
    • General
    • Accounts
      • Managing User Accounts
      • Roles
        • Permissions
      • Authentication
    • Real-Time API
    • Data Subject Requests
  • Profile Settings
    • Notifications
  • Guides
    • AWS Connector: Guides
      • Enterprise DCN
      • AWS Connector
    • Snowflake Connector: Guide
    • Optable CLI
    • Data Warehouse Exports
      • Google BigQuery
      • Snowflake
  • Announcements
    • Deprecation Notices
      • Q1 2025: Deprecation of Exports & Introduction of Syncs
      • Feb 21st, 2024: Removal of regex_allowed_http_origins
      • Dec 8th, 2022: Exports to Export Configurations
      • Deprecated uses in the CLI
Powered by GitBook
On this page
  • What Are Regular Expressions?
  • Where You Can Use Regular Expressions
  • Example

Was this helpful?

  1. Getting Started
  2. Reference

Regular Expressions

What are regular expressions, and how and where to use them in your Optable DCN

Last updated 1 month ago

Was this helpful?

What Are Regular Expressions?

Short for regular expression, a regex is a string of text that allows you to create patterns that help match, locate, and manage text.

Regular expression (regex) syntax differs slightly between programming languages and platforms. Optable uses the . You can use an online tool like to test your regex.

Where You Can Use Regular Expressions

Optable allows you to use regex when you define .

Example

Regex can save you a lot of time and help you perform actions that would be impossible to perform otherwise. Suppose a trait for which you have thousands of possible values, and you want to query it for the word shoe. You will want variations such as shoe, shoes, Shoes, Running shoes, but not horseshoe, shoelace. Listing all possible variations and exceptions would be nearly impossible.

With regex, you can do this: (^| )(S|s)hoes?([ .,;:!?]|$)

Breaking the expression down into its components:

  • () are grouping instructions/modifiers together

  • ^ means begins with

  • | means or

  • (^| ) means the expression must either start with the next instruction, or with a space, thus preventing words like goody two-shoes from being considered a valid query result, because of the - before the word shoes.

  • (S|s) allows the the lower and uppercase version of s. Another way of achieving this is by using modifiers such as (?i) at the beginning of the query.

  • ? means the previous character, or group of character if between (), is optional. In the expression (S|s)hoes?, the following values are considered valid: Shoe, Shoes, shoe, shoes.

  • [] representing a list or a class of characters. For instance, [0-9] means any numeric value, [A-Z] means uppercase letters.

  • $ means ends with

  • The current expression ([ .,;:!?]|$) means that the variations must end with (S|s)hoes?, or can be followed by an empty space or specific special characters (but not others not listed, such as -)

RE2 Syntax
this one
query audiences
Example of a regex matching with case insensitive variations of Romance, Romantic Comedy, and Comedy as favourite TV show genre