In-line tagging

Does anyone have suggestions of doing tags “within” a note and then being able to search/filter them?

For example, let say I want to group everywhere I have information on cats. But some of that information may also be embedded with information on dogs.

I would like to be able to “tag” that specific sentence, paragraph, etc and later be able to pull all info with the tag cat.

I do not want to see the whole not but just that sentence or paragraph.

Something like that. Has anyone done anything like this and may be able to offer ideas?

One way you find all the references to cats would be to create a note called Cat, and open the backlinks panel and now all the sentences with the word cat show up there as unlinked mentions.

That’s a really good idea. Other examples are if I had several logs of various projects (date/time, entry) and wanted to pull certain entries that are “tagged” with, let’s say a certain person’s name, across the various logs/notes that may not have their name mentioned in the log entry but would want it to appear in a summary-type page.

One example I thought of was to “tag” entries I wanted to include with something like {{tag}} then using the search feature to search “{{tag}}” would work or using Apple Shortcuts to loop through that search separating by CR/LF and format it a certain way.

However, if the text I wanted to include spanned more than 1 CR/LF then that would not capture it which led to some type of “beginning & ending delimiter” which would certainly work but adds complexity.

Just wondering if anyone else had a use case and other possible ways to solve it (without plain hard-core programming).