Full word search

Hello,

A very basic question as I’m new here. How do you do a full word search (in the find box)? Have fiddled around, but can’t figure it out.

Thanks!

Could you please define what you mean by full word search?

Tinderbox does a find at two scopes, either in the view pane (whole document) or text pane (current note’s $text)

By full word I mean that when you search for the word hat, you don’t get results ‘that’, ‘thatch’ etc.

Use a regular expression in the find box, e.g.

\b\w*hat\w*\b

word boundary, zero or more of any word character, the literal string ‘hat’, zero or more of any word character, word boundary. There are also find controls that let yuo choose if the regex match is case sensitive or not.

That expression is still giving me ‘that’, ‘thatch’ etc rather than just hat. Should I be adding something else to it?

Apologies, I misread the “don’t” part! An alternate/simpler version of the last above, to match exactly the word ‘hat’ might be:

\bhat\b

i.e. word boundary, the literal string ‘hat’, word boundary. Again you can also set for case-sensitivity (e.g. ‘Hat’, ‘hAt’, etc.)

For the regex-challenged, and because using regex is overkill when all one wants is “exact”, perhaps @eastgate should consider adding a checkbox for “exact” to the “case sensitive” and “aliases” options.

1 Like

Perfect - many thanks for clearing this up for me so quickly.

Being regex-challenged that sounds like a good suggestion!

Or just replicate what’s already done in this search box?

Meanwhile, in the other search box, just inserting a space before and/or after the search term does a pretty good job in most cases for the regex-challenged.

1 Like

Thanks for this. It would be nice to have that menu in the other search box too.