Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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

Rahul Priyadars
Tera Sage

can u also post event rule conditions and details like this 

 

RahulPriyadars_0-1687760517959.png

 

some limitations on regex in service-now

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0690762

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0749814

 

Regards

RP

Hi Rahul, PFA

 

is this an expected out put of regex when i just put 2 octets in IP

 

RahulPriyadars_0-1687762349397.png

 

Regards

RP

Hi Rahul,

 

Yes, this is expected. 

Screenshot 2023-06-26 at 1.18.17 PM.png

Screenshot 2023-06-26 at 1.18.29 PM.png