Hello everyone,
I'm having a problem with one of my automations. I have vulnerability tickets that contain a paragraph field with different host names.
Now I want to go through this field with host names in an automation and count how many hosts that match a regex are contained in total.
But it just doesn't work. I think it's because of my wrong approach.
have vulnerability tickets that contain a paragraph (multi-line) text field listing multiple hostnames, for example:
example-ce003.example.local, example-ce004.example.local, example-cf104.example.local, example-cf116.example.local
My goal is:
Go through this paragraph field in the automation and count how many hostnames match a certain regex pattern, such as:
example-cf*.example.local
The soltuion should be: 2
Unfortunately, match() hasn't worked so far.
Ultimately, I want to store the number of my results in a variable. For example, when I use log, the field of the field is displayed, but when I use size, match, or a function, nothing is displayed. Can anyone help me with the solution?
Best regards!