Regex Classification Rule Builder - Time Stamp | Community
Skip to main content
Level 2
Mar 23, 2022 4:08 PM UTC
Solved

Regex Classification Rule Builder - Time Stamp

Recently created a new eVar containing the timestamp utilizing the 'getTimeParting' (version 6.3) from Adobe Common Analytics Plugins. The results shows up as such: 

 

year=2022 | month=March | date=20 | day=Sunday | time=6:48 AM 

 

Currently having difficulty creating within the classification rule builder utilizing regular expressions to retrieve each value from the key-value pairs from the time stamp for year, month, date, day and time. Anyone have recommendations on how to approach this particular regular expression? Thanks!   

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
WesPhgAccepted solution
Level 2
Mar 23, 2022 10:40 PM UTC

Nevermind, will be closing this thread. Since the answer has been found! 

 

year=(\d+) *\| *month=(\w+) *\| *date=(\d+) *\| *day=(\w+) *\| *time=(.*)

 

3 replies

Pablo_Childe
New Participant
Mar 23, 2022 4:15 PM UTC

What are some of the rules and logic you have tried that failed? Can you post some examples here?

Translate
WesPhgAuthor
Level 2
Mar 23, 2022 5:56 PM UTC

Was provided this suggestion: (\w+) *= *([^|]*)

It seems to regenerate the first key-value pair, how do I expand this to provide additional match groups for month, date, day and time? 

 

 

Translate
WesPhgAuthorAccepted solution
Level 2
Mar 23, 2022 10:40 PM UTC

Nevermind, will be closing this thread. Since the answer has been found! 

 

year=(\d+) *\| *month=(\w+) *\| *date=(\d+) *\| *day=(\w+) *\| *time=(.*)

 

Translate