Help Center

| Submit or View Help Requests | Developer Docs |

View desktop instructions
View mobile app instructions
Regex (regular expression) inside the Parentheses

By placing part of a regex inside parentheses, you can group that part of the regex together. It captures the text matched by the regex into a group that will then be matched to the items in the actual list. The items added to the exception list (the group) and the regex between the parentheses should match so that the regex outside the parentheses can be applied to the whole list.

Note: You need to add list items that will match the regex inside the parentheses.

Inside the parentheses

The brand “ACME Smile” would like to pay their partner 1% per item when the customer purchases any dental brand product. ACME Smile does not have a list of SKUs for all dental products because they are constantly changing and adding new products. ACME Smile does know that all dental products start with either TOOTH, SMILETOOTH, or SHINETOOTH.

A few example SKUs are provided.

  • SMILETOOTH98763

  • SHINETOOTH65364

  • SHINETOOTH1123445

  • SMILETOOTH987fgdh

  • TOOTH65absv64

We know that all dental SKUs start with TOOTH, SMILETOOTH, or SHINETOOTH, so we can set up a SKU exception list and use the match expression tool.

Set up an exception list

  1. From the left navigation bar, select ellipsis-v-solid.svg [Menu] → Settings.

  2. Under the Exception Lists section, select SKU.

  3. Select Add New SKU List.

  4. Enter a name for this list.

  5. Select an event type you want to associate with this exception list.

  6. If you have a list of items/values for the list, select Save and Add Items to continue.

    • If you do not have a list or the list is too large to upload you can use the match expression tool.

    • You can add List Items or you can upload a CSV or Excel file with your promo codes, SKUs, or categories.

  7. Select Save. You'll now see your new exception list on the Exception Lists screen.

Add list items & match expression

  1. Add TOOTH, SMILETOOTH, and SHINETOOTH as list items:

    63d3bb4f6dcfa.png
  2. Below the Advanced Settings section, fill out the Match Expression field.

    • Inside the parentheses, add the 3 values that we know dental SKUs start with, separated by the regex character | which means OR.

    • Outside the parentheses, do the following:

      • Add the regex character ^ before the first parentheses which asserts position at the start of a line.

      • Add the regex character . after the last parentheses to match any character (except for line terminators).

      • Add the regex character * after the period to match the previous token between zero and unlimited times.

      Example: ^(TOOTH|SMILETOOTH|SHINETOOTH).*

  3. Select Save.

    63d3bb515fc34.png

Incoming conversion data & exception list matching

Now that you have set up a SKU exception list with the match expression tool and added the 3 list items, all incoming SKUs starting with TOOTH, SMILETOOTH, or SHINETOOTH will be considered a part of the exception list. Now you can add rules to your template terms, such as paying out $50 per order if these SKUs are present.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.