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/