I wanted to be as descriptive as possible in the title but here’s the problem I have. This is a bit strange.
So, I created an agent that in principle should gather all the notes containing the words ‘Drinka’ and ‘Persian’. If I construct the query as follows, it doesn’t yield any results.
I’m really puzzled. Why would indicating beginning/end of word with regular expressions make any difference? Why does one even need to use regex in this case if the strings in the query actually happen to match existing strings in the texts?
Actually, I think I know what the problem was but I’m still a bit confused. The following is the only note that contains the words Persian and Drinka. I think the search didn’t work because there is a colon right after Drinka:
Source: Oktor Skjærvø_Avestan and Old Persian Morphology.pdf
But this is questioned by Drinka: Language Contact in Europe: The Periphrastic Perfect through History:
Now, since there is the colon, I can see why the string “Drinka” would not be detected with .content (it would with .icontent) and how adding \b can help. What I don’t understand is why it works if \b is added at the beginning and end of “Persian” but not at the beginning and end of “Drinka”.
As for your comment about the semicolon, does that apply only to queries involving .contains? I’m asking because using a semicolon at the end of the query involving .icontains does seem to have some effect. The agent detects this note if I do: