I am trying to make specific search only within nested block (paragraph) in a note. For example only in A, B, C & D from the picture. Is there an operator for it?
I have tried line, block and section but not what I am looking for. There is a work around with section but it will involve using heading too much for my liking.
There isn’t. You could use a regular expression:/\t+.*test/
This should match 1 or more tabs followed by 0 or more characters followed by the search term “test”. If you want a specific level of indentation, remove the + and use a \t for each level. If you use spaces instead of tabs, replace each \t with the appropriate number of spaces.
There’s a way to make it match only the search term by using a “lookbehind assertion” but I forget the syntax. It might be /(<=\t+.*)test/
I think /\t*/ would be better than /\t+/. The former matches 0 or more tab, the later matches 1 or more tab.
And for searching(matching) the content within the bullet list, one can use/\t*-\s.*test.*/, which contains these parts:\t*, -, \s, .*test.* and will match the line looks like the following:
- abctest123
-abctest
And for the numbered list, one can use \t*\d+\.\s.*test.*
Oh, I see. So the search is about to find the text under curtain level of the list.
Yea, you are right. In that case, there should be more than 1 indent.
It should match both words and a tab together in the same line. (The tab is written as a tiny regular expression because as far as I know it’s the only way to search for one here.)