내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Classification rule builder - create buckets for the values

Avatar

Level 4

The values are storing in eVar, we have to group / buckets the values. I think the best way is to do classification rule builder 

I would like to create buckets for the values like this:

0 – 3000

3001 -5000

5001 -10000

10001 – 30000

30001 – 50000

50001 – max

Can any one help me on this how to bucket / group the values in the regex or suggest me how to achieve above scenario.

Thanks all

@All  

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor and Adobe Champion

Regex for numbers is hard... since Regex is based on text values.. it doesn't recognize numerical values, it doesn't understand the concept of greater than / less than.. this means you will have to come up with complex regex rules that break the numbers down into expect values based on position and length.

 

Here is an article that explains how to create regex for numeric ranges:

https://www.regextutorial.org/regex-for-numbers-and-ranges.php

 

I also suggest you should use a tool like https://www.regextester.com/ to populate a bunch of values so that you can check that the rules you create match your expected output.

 

Good luck.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Community Advisor and Adobe Champion

Regex for numbers is hard... since Regex is based on text values.. it doesn't recognize numerical values, it doesn't understand the concept of greater than / less than.. this means you will have to come up with complex regex rules that break the numbers down into expect values based on position and length.

 

Here is an article that explains how to create regex for numeric ranges:

https://www.regextutorial.org/regex-for-numbers-and-ranges.php

 

I also suggest you should use a tool like https://www.regextester.com/ to populate a bunch of values so that you can check that the rules you create match your expected output.

 

Good luck.

Avatar

Community Advisor

Here's something that's not immediately obvious about Classification Rule Builder: you can have more than one rule that classify a single eVar. AA will process the rules from #1 to #last.

So you could do the following:

Rule Number       Regex                                                               Classified Value

1                           *                                                                        Max

2                           ^(3000[1-9]|3[1-9][0-9]{3}|4[0-9]{4}|50000)$     30001 - 50000

3                           ^(1000[1-9]|1[1-9][0-9]{3}|2[0-9]{4}|30000)$     10001 - 30000

etc

Note: I have not tested any of the above regexes!

When you've set it up correctly, then when you test this rule set, you should (hopefully) get back your expected buckets.

Avatar

Level 4

Thanks all for the reply.

I have found Regex Numeric Range Generator URL https://3widgets.com/ . I think it will be helpful for all us.