AAM Trait Regex | Community
Skip to main content
New Participant
May 19, 2021
Solved

AAM Trait Regex

  • May 19, 2021
  • 2 replies
  • 2280 views

As per my understanding, we need to have the trait key name and value in place in AAM even though if we use regex to consider “ALL” (i.e.: .*) . Highlighted below.

 

Assume that, we have sent only 3 different dealcode trait key value to AAM but wanted to exclude those 3 key value but need to include rest of the new upcoming key value.

 

Scenario:

We would like to consider all users falls under dealcode by using regex .* and at the same time exclude the users with the specific value(“yaa|abc|tst”)

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Varun_Kalra

Hi there,

 

That should work and will exclude those 3 deal codes from the trait. Your regular expression will look for the substring and may exclude other dealcodes that use the same substring.

To be more precise and specific use string start and end match operators in your regular expression.

 

^yaa$|^abc$|^tst$

 

Also, once you have built the trait, you can use the trait validation tool while editing the trait and check if someone with those values will exhibit the trait or not:

 


Thanks,

Varun Kalra

2 replies

New Participant
March 28, 2022

@varun_kalra piggybacking onto this

 

Will there be a difference in using regex vs contains in the last argument? 

meaning; will both expressions under work? 

 

AND NOT

dealcode matchesregex "^yaa$|^abc$|^tst$"

 

VS

 

AND NOT

dealcode contains "yaa"

AND NOT

dealcode contains "abc"

AND NOT

dealcode contains "tst"

Varun_Kalra
Varun_KalraAccepted solution
New Participant
May 20, 2021

Hi there,

 

That should work and will exclude those 3 deal codes from the trait. Your regular expression will look for the substring and may exclude other dealcodes that use the same substring.

To be more precise and specific use string start and end match operators in your regular expression.

 

^yaa$|^abc$|^tst$

 

Also, once you have built the trait, you can use the trait validation tool while editing the trait and check if someone with those values will exhibit the trait or not:

 


Thanks,

Varun Kalra

New Participant
May 20, 2021
thanks @varun_kalra for your response