Finding a group of notes within a container that DO NOT contain the "[[" special characters?

(Tom Diaz) #1


I often use wiki type of links in $Text to link between files when I write. What I am now trying to do, is to error check these notes to find those notes that I have NOT used any links. IOW, I am trying to identify the files that DO NOT contain the ‘[[’ special characters within the note.

I can easily use the below query to find the notes that contain the “[[” but cannot seem to find the negation/opposite of this query.

this seems to give me the files that do contain “[[”

Question: is there a Negation regular expression to find the opposite of the above to find these “orphan (non linked) files”

Thanks in advance

(eastgate) #2

The ! operator performs negation

>    !($Text.contains("sprocket"))

is true for notes that do not mention sprockets.

! is useful!

TIP: It’s a good habit to be especially clear with parentheses when using ! because operator precedence can be confusing. Does


mean (!A)&B, or does it mean !(A&B)? Don’t guess: use the parentheses and make your intention clear.

(Tom Diaz) #3

Awesome. This works perfectly.

Thanks Mark for the explanation and tips on the parenthesis and assisting you in being clear in the order operations are done by the script. Any tips you pass along the way is much appreciated.

Thank you and the forum’s help as always on issues I bump into along the way.