Select All or Delete All Except Frontmatter in a page

I really need a new function that allows me to delete all content in a page except for the frontmatter/yaml/properties.

Most of my dataview queries spit out as markdown (I can’t stand opening an md file in notepad and seeing code instead of information).

The disadvantage is that I have to manually select everything except frontmatter, delete, and re apply the template that has the query every time I want an update. The pain is selecting everything below frontmatter to the end of the page, especially when the page consists of an extra large or long table.

I’d love a “Select All except Yaml” function, or better yet, “Delete All except Yaml”. Or even better, something that auto deletes all content under yaml and reapplies the template that is listed in frontmatter! Wow, that would be the goat.