Exclusion Trigger (Reverese Trigger?)

Post Reply
Dakhor
Posts: 7
Joined: Mon Apr 03, 2017 8:18 am

Exclusion Trigger (Reverese Trigger?)

Post by Dakhor »

Hello

I have been trying to think about how to do a simple trigger that catches all but the said parameters.

Lets say I want to catch all lines with ".* says:" and do something with them.

except anything that starts with

The .* guard says:
The .* knight says:

My mind keeps going at some database search function but maybe there is an easier way.

Cheers

DaK

User avatar
SlySven
Posts: 1023
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Exclusion Trigger (Reverese Trigger?)

Post by SlySven »

I had that issue a short while ago and I think it can be done with negative non-capture groups - have a play on https://regex101.com/ with this:

Code: Select all

^.*(?!(knight |guard ))says:.*

Post Reply