>_ IzzyLab

Topic breakdown

Extracting Markdown headers teaches anchoring a pattern to a position in the line. A header is hashes at the VERY start of the line, so without a start anchor ^ a hash somewhere in the middle of the text would also match. One-two-three header levels are covered by the "one or more" quantifier on the # character, and requiring a space after the hashes cuts off lines like #tag, which are not syntactically headers. Whole lines are needed here, so grep works without -o.

What's checked

  1. All headers found

What it looks like