Regex for ignoring keyword not working

I’m trying to monitor a page that randomly includes a “Sponsored” keyword that I can’t seemed to find. Attempts to learn regex led me to the following result

^(?!Sponsored$).+$

Saved and attempted to ReEdit to make sure it was actually saved. However, I’m still being notified by that keyword randomly appearing.

@beethovenmyson are you using the regex to filter textual content or in conditions to get better notifications?

I am using the Text Filter when using the element selector

there are two problems with the setting:

  1. the expression should be entered in the first input box. the second input box is for regex flags that is usually set to gim
  2. i do not think the regular expression is going to do what you want it to do.

if want to exclude the word from the monitored, try using the following regular expression: \b(?!sponsored\b)\w+\b. use gim as the fags.

or, did you want to use it as a condition so that if the added text contains “Sponsored” keyword, do not trigger an alert?

Ok, I thought that was just a label. I changed the expression to match what you have but it is still alerting me every time keyword appears (I changed the keyword to match).

i had a feeling that would be the case because how that regex works. the first step is to figure out what the changed text looks like. when viewing changes, switch to “text” mode from the default “visual” mode. the text mode will show you the exact text captured and changes in it. let me know what you find out.

a good way to filter out unwanted alerts is using conditions. when using conditions, check out https://distill.io/docs/web-monitor/using-conditions-to-get-alert-on-important-changes/#how-to-find-out-which-condition-triggered-the-alert. it will show the text values as well as the conditions evaluation result.