I have a Daily Planner Siri Shortcut that generally works well; but recently I have realized that I have some days where I don’t finish my prior day’s items and want to scrape the Daily Planner note (it’s in Bear) to find the unfinished ones and then, add them to today’s.
Here is a screenshot of my Shortcut (I know I should also work on updating the MIT variable vs creating three instances, any suggestions on that would be much appreciated too):
Always best to share a link to your shortcut that people can work with and an actual set of data - both sanitised of course to remove any personal data.
I have tried to accommodate various scenarios that are not explicitly covered by your listing, but it may well not cover everything. Here is an example shortcut that I think will get you most if not all of the way to doing what you want based on the description thus far.
- [x] random completed task here
~~- [ ] text of some sort here~~
Some random text interspersed with the tasks
- [ ] unfinished task example 1
- [x] random completed task here
~~- [ ] text of some sort here~~
Look, it's more text but is this an unmatched task on the same line - [ ] don't include me
- [ ] unfinished task example 1
- [ ] unfinished sub task 1.1
- [ ] unfinished sub task 1.1.1
- [X] finished sub task 1.2
- [ ] unfinished sub task 1.3
The result it gives is this:
~~- [ ] text of some sort here~~
- [ ] unfinished task example 1
~~- [ ] text of some sort here~~
- [ ] unfinished task example 1
- [ ] unfinished sub task 1.1
- [ ] unfinished sub task 1.1.1
- [ ] unfinished sub task 1.3