nothingislost / obsidian-query-control

An experimental Obsidian plugin that adds controls to embedded queries
MIT License
278 stars 16 forks source link

[Feature Request] Regex Capture groups #8

Open rapatel0 opened 2 years ago

rapatel0 commented 2 years ago

Cross post for the https://forum.obsidian.md/t/regex-capture-groups-for-query/33627

It would be nice to enable regex capture groups to subselect the text that is returned from a query.

Query

path:(Operations/Calendar/Daily/2022/03/2022-03-07) /Summary of topics discussed/

Example: image

Ideally, “Summary of topics discussed” could be removed from the query results and only the remaining text would be returned by the query

Proposed solution Regex Capture groups.

Example Query

path:(Operations/Calendar/Daily/2022/03/2022-03-07) /Summary of topics discussed((.|\n)*)-/

This slight modification would match only the text in the capture group.