Expand my Community achievements bar.

CJA - Multiple Regex Replace functions in a derived field

Avatar

12/23/24

Description - More than one "Regex Replace" functions should be allowed in CJA derived fields

Why is this feature important to you - This will allow CJA users to build more refined rule based classifications

How would you like the feature to work - A derived field should have options to add multiple "Regex Replace" functions in it's definition.

This will help in building more refined rule based classifications (similar to Adobe Analytics' Classification Rule Builder) where a field can be created by matching multiple regex strings.

A very simple requirement could be a field with two different formats of values in it having different number of delimiters. An example could be below two values,

  • 1997:Brand:Model
  • 1997:Brand:Model:Release

To create a derived field that extracts all the brand values from these two formats we need to match two regex strings,

  • ^(.+)\:(.+)\:(.+)$ and return $2 as value
  • ^(.+)\:(.+)\:(.+)\:(.+)$ and return $2 as value

This can be achieved by adding two "Regex Replace" functions in the derived field but currently we can use this function only one time per derived field.

Current Behaviour - Currently CJA allows only one "Regex Replace" function per derived field.