Help Center

| Submit or View Help Requests | Developer Docs |
| |

Regex (regular expression) outside the Parentheses

Outside the parentheses

When you want to do more than simply match items in the list, you need to place the regex outside the parentheses. This will then apply the regex to the entire group (list items). The characters outside of the parentheses will match the incoming conversions and their corresponding SKUs, categories, or promo codes.

Example Scenario

The brand “ACME Auto” would like to decrease the payout on all tires. ACME Auto does not have a list of all the tire SKUs but knows that all tire SKUs start with 3 letters followed by 5 numbers. The 3 letters represent the brand and the 5 numbers represent the model number. ACME Auto can provide the 3-letter code for the brand so they can set up an exception list and use the match expression tool. ACME Auto adds new tire brands frequently so they would like the ability to add additional 3-letter codes in the future.

Tire Brands unique 3 letter codes

  • ABC

  • DEL

  • XYZ

Adding list items

You must add at least 3 SKUs to the list; one for each brand. You can add a new brand by adding a new item to the list. E.g. Add BHG123 for brand BHG.

Match Expression tool regex

Inside the parentheses:

  1. Add \w{3} inside the parentheses to match the 3 letter combination to the items in the SKU list.

Outside the parentheses:

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

  2. Add \d{5} after the last parentheses to match 5 digits after the 3 letter combination.

^(^\w{3})\d{5}

Incoming conversion data & exception list matching

Once you have correctly set up your match expression tool regex and added matching group items to the list, incoming conversions that match the grouped regex will be flagged as part of that exception list and any contract rules will then be applied.

Did you find it helpful? Yes No

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