It seems negative lookbehind expressions (which should be valid in both Ruby and JS flavors of regex, the latter as of ECMAScript 2018) don’t work in Watched Words.
Here’s an example:
(?<!new\s)\bcar\b should match instances of
car that are not preceded by
E.g. it should match
car in this sentence:
He drives a car
But not in this sentence:
He drives a new car
However, it returns the following error when adding under Watched Words:
Is this not supported on purpose or is it a bug? Or does it need to be written in a different way?
I don’t encounter this issue:
Does it also work for you for automatic linking?
Strange that it’s not working for me then. I’m currently on 3.1.0.beta4, will upgrade to the latest and try again…
Interestingly, it seems to be browser-dependent. I get the error in Safari, but not in Chrome. When adding it in Chrome and viewing the list in Safari the error shows up there.
But I guess I can just ignore it for now.
I tried it on Chrome (Windows) and Safari 16.5.2 and I still couldn’t reproduce your issue.
Turns out it’s only supported from Safari 16.4, and I had 16.3.
Still causing other issues for me, though (like can’t save my user preferences):