>_ IzzyLab

Topic breakdown

Removing markup is a classic sed -E substitution task, where the trap is not in the replacement itself but in describing the tag. The naive notation "any character however many times" is greedy: * pulls the capture to the last closing bracket in the line, swallowing the text between tags. The correct mental move is to describe the tag contents with a negated character class ([^>]), which physically cannot eat a > and therefore stops at the very first closing bracket. The g flag is needed to process all tags in the line, not just the first.

What's checked

  1. Tags removed
  2. Text preserved

What it looks like