Leiste mit Community-Erfolgen erweitern.

Mark Solution

Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.

GELÖST

AAM Trait Regex

Avatar

Level 4

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 Akzeptierte Lösung

Avatar

Korrekte Antwort von
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

Lösung in ursprünglichem Beitrag anzeigen

3 Antworten

Avatar

Korrekte Antwort von
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 3
thanks @Varun_Kalra for your response

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"