Expand my Community achievements bar.

SOLVED

How to write SAINT classification rules?

Avatar

Level 2

Hi,

 

I am trying to set SAINT classification rule for the values in the reports below:

 

Screenshot (654).png

 

Capture.PNG

In the above, I want to create a new report which breaks down the value into a new report which only the following values:

for screenshot 1

  • IS-1234
  • 070120
  • 876875765988
For screenshot 2
  • D
  • Preferred 150
  • cox-internet-with-panoramic-wifi
  • DAR168C
  • B0DAF9BC7740
What type of Regular Expression do I need to write in match criteria column in order to achieve the results?
 
Thanks in Advance,
Reddy
 

 

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi @reddy24097613 ,

 

It depends on how static these values are. If they are completely static, it would be best to give a very explicit regular expression:

^(?:IS-1234|070120|876875765988)$

and

^(?:D|Preferred 150|cox-internet-with-panoramic-wifi|DAR168C|B0DAF9BC7740)$

 

If they are meant to be more dynamic, it is important to understand the pattern behind the potential values. Unless the patterns are known, there is no way to give a dynamic solution in this thread.

 

All the best

View solution in original post

8 Replies

Avatar

Correct answer by
Level 6

Hi @reddy24097613 ,

 

It depends on how static these values are. If they are completely static, it would be best to give a very explicit regular expression:

^(?:IS-1234|070120|876875765988)$

and

^(?:D|Preferred 150|cox-internet-with-panoramic-wifi|DAR168C|B0DAF9BC7740)$

 

If they are meant to be more dynamic, it is important to understand the pattern behind the potential values. Unless the patterns are known, there is no way to give a dynamic solution in this thread.

 

All the best

Avatar

Level 2

Hi @Jacob-DDdev,

 

Thanks for your inputs. The values are always dynamic in this both reports. So what type of regular expression do i need to write here for both the reports?

Avatar

Level 6

Okay, I think I understand better what you are trying to do. With classifications you can either group similar values or parse values that have a pattern. (I initially thought you were grouping those values into a single variable)

In particular, you are breaking apart a comma delimited list.

If the order of the items being separated are always consistent and the the list is always the same size, the regex can be significantly simplified. So it is very useful to always pass in an empty value even if there isn't data (e.g. "IS-1234,,876875765988").

 

If they were always in the same order and the list was the same length it would be something along these lines:

^([^,]*),([^,]*),([^,]*)$ where you send $1 into the first variable, $2 into the second, and $3 into the third. In general, you could replace the comma with any delimiter.

 

If items do not always appear in the list or if the order changes, there is significantly more complexity... so much so, that it would probably be easier to have a developer just ensure that the list is always in a fixed order/length compared to writing an ugly, computationally taxing expression.

Avatar

Level 2

Hi @Jacob-DDdev,

 

This rule is not working for the below report.

 

Capture.PNG

 

The values are always dynamic in this report. so i have used below condition for this saint rule. Please correct me if I missed any thing in the below regular expression criteria.

 

Capture.PNG

Avatar

Level 6

Hi @reddy24097613 , you'll need to repeat the pattern to match the length of the list.

So in this case you have 5 items in the list so it would look like the following:

^([^,]),([^,]),([^,]),([^,]),([^,])$

Avatar

Level 2
You have not mentioned * in the pattern. is this pattern still works or do i need to add * to the expression ^([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)$

Avatar

Level 6
Hi @reddy24097613 , good catch. Yes, the pattern you mentioned with the astrix is the correct one.