Classificaton Rule Builder - Regex Help

Avatar

Avatar
Validate 1
Level 1
rahulg59969364
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
rahulg59969364
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
rahulg59969364
Level 1

18-12-2018

Hi,

I just wanted to ask for some guidance around using regex in the Classification Rule Builder.

I have created a rule set for an eVar which is set to a string, where there can be numerous iterations of the same pattern inside. The aim is to grab the nth iteration of that pattern and then set it to a classification value based on what has been sent through.

Example of eVar value: AA-BB-CC+DD-EE-FF+.....

The delimiter above is the + sign and each value is further separated into hyphens. The 'AA-BB' or 'DD-EE' values would then hopefully be captured by the regex rule and set the classification accordingly.

I did some googling around to try and match the nth iteration of a pattern within a string but what I found out was that they weren't being set correctly, despite the match being correct.

For example:

(?:([^\+]+\+){6})(AA\-(BB|EE)\-\(.+))(?![^\+]+) - This would try to catch the 7th iteration of the pattern (non-captures the first 6 iterations followed by a +), and would ignore anything afterwards because of the negative lookahead.

The rules I created were for 1 up to 8 iterations of the above pattern and each one had a different variation of the rule to be classified (it has up to 6 different values)

The issue is that when capturing anything from the 3rd or 4th iteration onwards, some classifications would be overwritten because there would be matches further down the rule set, even if they are not supposed to match.

This is a bit of a loaded question so I do apologise, but I was hoping if there are any other examples that could help me reach some sort of resolution.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
Level 6
pabloc82923542
Level 6

Likes

78 likes

Total Posts

358 posts

Correct reply

82 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

78 likes

Total Posts

358 posts

Correct reply

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

18-12-2018

Here are a couple threads with info of some regex pattern Ideas..

https://forums.adobe.com/thread/2511817

https://forums.adobe.com/thread/2501726

I am leaning on seeing if using SAINT upload classifications is maybe a way to go(a different option).

GLTU

Answers (0)