Expand my Community achievements bar.

SOLVED

Regx in filter or segment

Avatar

Level 3

Hi Everyone, is it possible to use regular expression in workspace freeform table filter or segments in Adobe Analytics?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

There is some very limited wildcard usage in segments.  

 

Here's an image from Adobe's documentation 

 

Josh_KC_0-1686860869328.png

 

View solution in original post

5 Replies

Avatar

Community Advisor and Adobe Champion

Unfortunately, regex is not supported in Segments....

 

However, you can use Regex in Classifications / Classification Rule Builder.. which could be used to create a classification based on what you want to filter, then use the classification in your segment....

 

Just a note, classification rules run every 4-6 hours, so as long as you aren't looking at "today" as your data set, you should be fine.

 

Here is some info about Classifications: https://experienceleague.adobe.com/docs/analytics/components/classifications/c-classifications.html?...

 

Here is some info about Classification Rule Builder:

https://experienceleague.adobe.com/docs/analytics/components/classifications/classifications-rulebui...

 

But essentially, you could set up a classification such as "segment option".

 

Then create a classification rule using your regex, and set the classification "segment option" to a value like "my filter" (use more descriptive names)

 

Then you can create a filter looking at dimension "segment option" and value "my filter"

Avatar

Correct answer by
Community Advisor

There is some very limited wildcard usage in segments.  

 

Here's an image from Adobe's documentation 

 

Josh_KC_0-1686860869328.png

 

Avatar

Community Advisor and Adobe Champion

Hahah fair play.. I guess a "wildcard" is technically a simple regex 

 

When I think "regex" I think full and proper regex, and refer to "wildcard match" as just that.

Avatar

Community Advisor

Definitely not regexp but perhaps useful depending upon the use case.

Avatar

Community Advisor and Adobe Champion

I agree!

The following has evaluated to null or missing: ==> liql("SELECT id, subject, body, depth, post_time, author.login, author.id, author.rank, metrics.views FROM messages WHERE topic.id = '${topicId}' AND is_solution = true").data.items[0] [in template "analytics-container" at line 82, column 31] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign acceptedAnswer = liql("SELECT... [in template "analytics-container" at line 82, column 5] ----