Hi community,
I am trying to replace spelling mistakes on our boards with correct words to avoid errors later.
I am however having issues with negative rules in my trigger. Butler seems not to take these into account.
In short my issue is that I want to replace "BC" in description in cases where the description does not contain "ABC" or "BBC". However my trigger still fires regardless if my description contains ABC or BBC replacing the content.
Currently my rule looks like this:
when the description of a card with a description not containing "ABC" with a description not containing "BBC" contains "BC", set the card's description to "{textbeforematch}CB{textaftermatch}"
Could you help me out here?
@Korppu the best way to do this is using a regex with a negative look behind:
when the description of a card contains "regex:/(?<![AB])BC/", set the card's description to "{textbeforematch}CB{textaftermatch}"
I tested this out, when I set the description to ABC or BBC it doesn't change, but when I set the description to KBC it changes it to KCB
Worked wonders. Thanks @Iain Dooley
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.