Thanks for the tip!
That regex was a bit complicated since it was my first time… But I managed a makeshift way around to put a query embed inside my weekly note which includes a specific heading that occurs in all my daily notes with only to do tasks and other text under it. It does not include done tasks.
For example, inside my weekly note there is (let’s say it’s related to chores for simplicity):
Weekly Note
### Weekly-Task-1-1
- sweep and mop floors
- do laundry
- go grocery shopping
%%Here is where I put the query embed right under this list (still inside the weekly note)%%
```query
path:"Weekly Note" -file:"Weekly Note" (section:(### Daily-Task1-1-1 /^((?! \[\x] ).)*$/
```
This is what the embed query looks like based on the daily notes further below
YYYY/YYYY-MM/YYYY-MM-W/YYYY-MM-W-Daily Note 1.md
#### Daily-Task1-1-1
- [ ] mop
- Here's some extra text
And more text
YYYY/YYYY-MM/YYYY-MM-W/YYYY-MM-W-Daily Note 2.md
#### Daily-Task1-1-1
- [ ] whites
- [ ] darks
YYYY/YYYY-MM/YYYY-MM-W/YYYY-MM-W-Daily Note 3.md
#### Daily-Task1-1-1
- red delicious
- macintosh
- [ ] avocados
And inside all my Daily notes there is ### Daily-Task1-1-1
So the headings in my different daily notes labeled Daily-Task1-1-1 are related to weekly task 1-1, not Weekly-Task 1-2.
Daily notes look like:
Daily Note 1
### Daily-Task1-1-1
- [x] sweep
- [ ] mop
- Here's some extra text
And more text
Daily Note 2
### Daily-Task1-1-1
- [ ] whites
- [ ] darks
- [x] colors
Daily Note 3
### Daily-Task1-1-1
- [x] apples
- red delicious
- macintosh
- [x] bananas
- [ ] avocados
So the only issue is that the text indented under the done tasks stills shows up.
I also had to exclude the weekly note as part of that search (-file:“Weekly Note”) otherwise it interfered with other embeds of the Daily-Task1-1-1 heading that I had in different sections for other purposes of the weekly note.
Also, you wouldn’t by chance know how to include another heading inside that code for the query embed? Like if I wanted to included the Daily-Task1-1-1 heading but also another heading inside the daily notes. The search won’t let me include any child headings under Daily-Task1-1-1.