Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

filter classification rule

Avatar

Level 2

hi there, 

is there anyone who knows how to not to correct 1 depth data if there is 2 or 3 depth data? 

 

for example, as you can see the picture, 

 

gnb: test_company_all has 2 values : "all" for 3depth and "tes" for 1depth (donna why just "tes" came out :(, anyway) 

 

but i would like to get just "all" for 3depth, since "tes" is not the data that i want to collect. 

 

1depth should collect just 1 depth sentence like "gnd:test3" which doesn't have _ in value. 

 

let me know if you guys know the way. thanx 

this is the regular expression that i used for this classification 

 

1depth: ^(gnb: )(.[a-zA-Z0-9 ]+)[^_$%^&]
3depth: ^(gnb: )(.*)(_)(.*)(_)(.*)

20210222_154103.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Regarding your "tes" value in 1depth, it's because of your RegEx. I believe 1depth is getting the content of the $2 group.

So, with some colouring to help to explain:

Your regular expression for 1depth: ^(gnb: )(.[a-zA-Z0-9 ]+)[^_$%^&]

Your value and its matches: gnb: test_company_all

The red expression is preventing the last character from being included in your green expression. So instead of "test", you're getting "tes", i.e. without the last "t".

Likewise with "gnb: test2_company_all" and "gnb: test3"

View solution in original post

2 Replies

Avatar

Community Advisor

Hello Hyeran,

It can be achieved by Stacking Rules in Classification Builder.

Check out my blog (https://terrynwinter.com/adobe-analytics-stacking-rules-in-classification-rule-builder/) and the same will help you on what you are trying to achieve.

Thank You, Arun.

Avatar

Correct answer by
Community Advisor

Regarding your "tes" value in 1depth, it's because of your RegEx. I believe 1depth is getting the content of the $2 group.

So, with some colouring to help to explain:

Your regular expression for 1depth: ^(gnb: )(.[a-zA-Z0-9 ]+)[^_$%^&]

Your value and its matches: gnb: test_company_all

The red expression is preventing the last character from being included in your green expression. So instead of "test", you're getting "tes", i.e. without the last "t".

Likewise with "gnb: test2_company_all" and "gnb: test3"