Regex in event rule not working

pratiksha5
Mega Sage

I am trying to write a event rule. I need to filter it on the basis of event description. If the description dose not contain IP address then this rule should execute. 

 

Regex is : .*^(?!.*\b(?:\d{1,3}\.){3}\d{1,3}\b).*

 

I validated this on https://regex101.com/

 

But the rule is executing in both the conditions. Please guide. 

 

 

10 REPLIES 10

Henrik Jutterst
Tera Guru

Not sure if you got this to work or not, but here's how I would do it:

HenrikJutterst_0-1688644108913.png



The RegEx that I used was:
\b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b

 

However this is only for IP 4 IP addresses, but you can probobly find more on the web if you look.
But as mentioned above. remember to mark the Ignore-checkbox if the RegEx Matches if you don't want to create Alerts from the event.


HenrikJutterst_1-1688644296574.png


Link to RegEx reference: 7.16. Matching IPv4 Addresses