Regex How to Include and Exclude in same expression

book

Article ID: 34711

calendar_today

Updated On:

Products

DX Infrastructure Management NIMSOFT PROBES

Issue/Introduction

Introduction

Regex How to Include and Exclude in same expression

 

 

Instructions:


select all hosts that have sjc but should not have nm in them.

This can be required in Distribution manager, nas alarm filters etc. You can use following regex to include certain characters in a name while excluding which have certain characters you don't want to include. Like in following example:

sjchyd
ussjcnimbu
uswestsjctada

If you want to get the ones which have "sjc" but not "nim" in them, use follwoing regex:

/(?!.*nim)sjc/

Environment

Release: CNMSPP99000-8.47-Unified Infrastructure Mgmt-Server Pack-- On Prem
Component: