Expand my Community achievements bar.

SOLVED

AAM Trait Regex

Avatar

Level 3

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”)

MA1985v1_0-1621454853546.png

 

1 Accepted Solution

Avatar

Correct answer by
Level 9

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:

 

Varun_Kalra_0-1621480788066.pngVarun_Kalra_1-1621480854134.png


Thanks,

Varun Kalra

View solution in original post

3 Replies

Avatar

Correct answer by
Level 9

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:

 

Varun_Kalra_0-1621480788066.pngVarun_Kalra_1-1621480854134.png


Thanks,

Varun Kalra

Avatar

Level 2

@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"