classification builder | Community
Skip to main content
Level 2
November 1, 2019
Solved

classification builder

  • November 1, 2019
  • 3 replies
  • 3295 views

I have two different types of values and I want to classify them into quartile buckets for scroll depth tracking.

value 1 = highestPercentViewed = 33 | initialPercentViewed = 33

value 2 = 33|33

the above should both be bucketed in 50% scroll depth

however I cannot do both in the same logic. is there a way to get both in the same logic?

highestPercentViewed = ([1-9]|1[0-9]|2[0-5])(?:[^0-9]|$) = up to 25%

highestPercentViewed = (2[6-9]|3[0-9]|4[0-9]|50) = up to 50%

highestPercentViewed = (5[1-9]|6[0-9]|7[0-5]) = up to 75%

highestPercentViewed = (7[6-9]|8[0-9]|9[0-9]|100) = up to 100%

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 Asheesh_Pandey

You can use following, it should match both the conditions.

((^.*\b0?[0-9]$|.+1[0-9]|.+2[0-5])) = up to 25%

((.+2[6-9])|.+3[0-9]|.+4[0-9]|.+50) = up to 50%

((.+5[1-9])|.+6[0-9]|.+7[0-5]) = up to 75%

((.+7[5-9])|.+8[0-9]|.+9[1-9]|.+100) = up to 100%

Thanks,

Asheesh

3 replies

fsakjlfdsakljfd
Level 5
November 6, 2019

Have you considered uploading a classification file instead?  I did something similar with a client in the past and it took less than 10 minutes to complete with excel.

Asheesh_Pandey
Community Advisor
Asheesh_PandeyCommunity AdvisorAccepted solution
Community Advisor
November 6, 2019

You can use following, it should match both the conditions.

((^.*\b0?[0-9]$|.+1[0-9]|.+2[0-5])) = up to 25%

((.+2[6-9])|.+3[0-9]|.+4[0-9]|.+50) = up to 50%

((.+5[1-9])|.+6[0-9]|.+7[0-5]) = up to 75%

((.+7[5-9])|.+8[0-9]|.+9[1-9]|.+100) = up to 100%

Thanks,

Asheesh

- Asheesh
user01276Author
Level 2
November 6, 2019

perfect. thanks. this will help me improve my regex skills