Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Regex help in Classification Rule Builder

Avatar

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
timf25166966
Level 2

12-06-2018

Hello,

I am trying to create site sections in Adobe Analytics. I already have the page in this format test: testa: testb: testc:testd

The url can vary from test: testa: testb: testc:testd to testa: testb: testc to testa: testb to test.

My current regex formula only works for test: testa: testb: testc:testd and none of the shorter pages.

This is the current formula I am using and its proving to not be of use because shorter urls are not being identified for classification.

^(.+)\:(.+)\:(.+)\:(.+)\:(.+)

Do you have a recommendation on how to create a dynamic formula?

Thanks,
Tim

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

517 likes

Total Posts

1,016 posts

Correct Reply

255 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

517 likes

Total Posts

1,016 posts

Correct Reply

255 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

12-06-2018

i use a solution similar pabloc82923542​ suggested and it works perfect.

within the ruleset define the following rules:

^([^\:]*)     sitesection1 is $1

^([^\:]*)\:([^\:]*)     sitesection2 is $2

^([^\:]*)\:([^\:]*)\:([^\:]*)     sitesection3 is $3

i hope i wrote it right for the first levels. if yes, those rules should put the right values in the corresponding classifications. just add more rules if you need more levels.

please let us know if those rule work!

regards

Answers (8)

Answers (8)

Avatar

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
timf25166966
Level 2

12-06-2018

Appreciate it @ursbuller it worked!

Avatar

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
timf25166966
Level 2

12-06-2018

This would not work based on my prior testing. If urls are two different delimiter lengths it would throw off the result.

Avatar

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
pabloc82923542
Level 6

12-06-2018

If you do theses:

^(.+)\:(.+)\:(.+)$

test: test: test

^(.+)\:(.+)$

test: test

?

Avatar

Avatar
Level 1
james_cf2588405
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
james_cf2588405
Level 1

Likes

0 likes

Total Posts

3 posts

Correct Reply

0 solutions
View profile
james_cf2588405
Level 1

12-06-2018

I also seem to be having this same or similar issues

Avatar

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
timf25166966
Level 2

12-06-2018

Hello,

Yes I have read through the documentation.

If I use this formula ^(.+)\:(.+)\:(.+)\:(.+)$ I will only catch a url such as  test: test: test: test

It will not read a url as  test: test: test.

My issue is that the formula isnt dynamic enough for my use case.

Avatar

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
pabloc82923542
Level 6

12-06-2018

ok i think this may help you

Regular Expressions in Classification Rules

1,2,3,4 examples per each line:

^(.+)\:$     output is $0

^(.+)\:(.+)\:$     output is $1

^(.+)\:(.+)\:(.+)$     output is $2

^(.+)\:(.+)\:(.+)\:(.+)$     output is $3

bear in mid then each output has to be defined as well

A

$0: em:JuneSale:20130601

B

$0: em:JuneSale:20130601

$1: em

C

$0: em:JuneSale:20130601

$1: em

$2: JuneSale

D

$0: em:JuneSale:20130601

$1: em

$2: JuneSale

$3: 20130601

Avatar

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
timf25166966
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Applaud 5
View profile
timf25166966
Level 2

12-06-2018

Hello,

Thanks for responding.

          This is for page formatting for site section. I want to establish Site Section 1, Site Section 2, Site Section 3, Site Section 4.

          The current issue is that since I formatted every / as a : I am trying to use : as a delimiter to build all 4 sections.

When I use ^(.+)\:(.+)\:(.+)\:(.+)\:(.+) it only accepts urls with multiple delimiters rather than if its a short url with one or 2 delimiters.

I would like to make a formula that accepts 1,2,3, or 4 delimiters. Let me know if that is helpful.

Avatar

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

76 likes

Total Posts

358 posts

Correct Reply

81 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
pabloc82923542
Level 6

12-06-2018

Not sure which variable you are trying to segment but have you thought of using SAINT upload to designate each one and then just do correlated reports as needed? Are you creating alot of new URLs regularly?

If not have you tried to add space designation?

\s

^(.+)\:(.+)\:(.+)\s\s

for 2 spaces etc