Regular Expression that can be used in a Spectrum Event Condition that will check for a string that is not present in a variable
search cancel

Regular Expression that can be used in a Spectrum Event Condition that will check for a string that is not present in a variable

book

Article ID: 214209

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Regular Expression that can be used in a Spectrum Event Condition that will check for a string that is not present in a variable

Environment

Release : 20.2.x, 21.x, 22.x

Component : Spectrum Alarm & Event Management

Resolution

Users may want to configure an event condition to check if an event variable does not contain a certain string. The below regular expression will accomplish this task:

^((?!String).)*$

The above expression will be true if the event variable does not contain "String".

 

Example:

0xfff00003 E 50 R CA.EventCondition, "(regexp({v 203}, {S \"^((?!AYT Audit).)*$\"}))" , "0xfff00004  -:-"

 

With this, the 0xfff00004 event will be generated if the string in the variable 203 does not contain "AYT audit".