>_ IzzyLab

Topic breakdown

Cutting out fragments of a fixed format is about the grep -oE mode, which prints only the matched part, not the whole line. For fixed-width fields (hours, minutes, seconds always two characters each) the right tool is the counting quantifier {2} on the digit class, not +: + would accept both one and three digits in a row, blurring the format. The colon is a literal character and has no special meaning in regex. The idea of the task: a precise width pattern distinguishes a real timestamp from similar numbers.

What's checked

  1. Time extracted
  2. All timestamps found

What it looks like