Search for more than one whole word

I don’t want to bore anyone here. Maybe you all know this already. But it has only recently become clear to me. If I want to search for more than one whole word, this works quite well.


image

The “normal” search finds this

image

It is a great help to me :smiley:

1 Like

That does look useful, for sure.

Alice arrived carrying the note, thirty sharpened pencils, and a book. A book!

“Hey, officer,” called Cal, “book him already, why don’t you?”

I guess you would not catch any of these though.

You found the weak points right away :wink:. In the context to my texts, I would say that a maximum of 20% is not found. Or the other way around, I find 80%. :slightly_smiling_face:

Oh, for a non-alphanumeric wildcard! (Some regex wizard can probably do it.)

regex. Do you mean like this?

\bnote\b|\bbook\b

But this will find all documents that contain at least one word. If I want only documents with both words, I have to do two searches. Or am I wrong?

Try this, @fto:

(note.*book)|(book.*note)

Thank you @drmajorbob . Does not work unfortunately, although it should, as is also confirmed here … the other explanations I do not understand unfortunately. Do you?

I found out: What @drmajorbob suggests
(note.*book)|(book.*note)
finds the words “note” and “book” but also the text in between.

Does anyone know how to find only these two words? Thanks a lot!

If do project search with operator set to all words, then if did note and book(separate by a space) will find files that contain both words or words that contain them like selection, and notebook.

Thank you @GoalieDad
I usually do the same. Or I search only for whole words. But that only works with one word per search. So several searches are necessary. Actually no problem. I just wanted to see if regex is an alternative. But I don’t know how that works and also a search in the net didn’t show anything. I wonder, however, that such a specialized “language” should not be able to do that.

No if type in multiple words separated by a space and operator all words will pull files contains all words.
If use operator any word should allow you to search multiple words at once. Do have a regex expression that works if above no work.

Yes, but it only returns matches for words surrounded by space chars. If the word happens to be at the end of a phrase ( and there is a parentheses or bracket or slash or dash or etc, before or after or a “,” or “:” or “;” or “/” etc after it ), or its at the end of a sentence and the next char is a “.” or “?” or “!”, or if its at the beginning of a phrase… you are out of luck.