I wonder whether SEDE could figure out how many headings (#
, ##
, ...) a user uses in their answers.
I came up with this query
SELECT
Id AS [Answer],
LEN(Body) AS [Length]
FROM Posts
WHERE PostTypeId=2 AND OwnerUserId=##uid##
AND Body LIKE '%# %'
but it also matches text like C#
.
I thought of adding a newline '%\n# %'
or '%'+CHAR(10)+'# %'
but that just returns no results anymore.
Body
appears to be rendered HTML, so you should be looking for<h1>
through<h6>
elements, not the Markdown for them (which would be incomplete, as they could have been entered as raw HTML in the user input).