GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Exclude a match regular expression FAYT


#1

Greetings
I have my FAYT filter setting to use regular expressions.
By default if you enter the expression

cisco

The lister is going to filter out everything that does not contain the string.
I sometimes want to do the opposite.
Is there an easy way to do this?
I can filter out all items that do contain the string Blah with this regex:

^(?:((?!Blah)).)*$

I dont understand this regex just grabbed it off the web.
This does not filter out items that do contain Blah or Cisco:

^(?:((?!Blah)|(?!Cisco)).)*$

Have not worked out why yet

Anyway is there an easier way?
Thanks in advance.....


#2

Try ~(Blah|Cisco).


#3

That works if you're in the default wildcards mode, but not with regular expressions.

Regular expressions aren't good for matching negatives, but you can do it using this:

^((?!(Blah|Cisco)).)*$

That's from here:


#4

Heck! I wasn't even aware regex can be used in the filter bar. Nice! Might be an idea to place a little check box or toggle button there to save the trip to the preferences.


#5

Gentlemen. Thank you.