>_ IzzyLab

Topic breakdown

Zero-width assertions (lookaround) define the context of a match without consuming it: (?<=X) requires X to the left, (?=X) — X to the right, (?<!X)/(?!X) are the negations. Combined with grep -o, which prints only the matched part, this lets you extract a value without the surrounding key and without post-processing. Lookaround is available in the PCRE mode grep -P; basic and extended POSIX syntax (grep, grep -E) doesn't support it.

What's checked

  1. the file has all token values
  2. no extra lines
  3. the token= key is not in the output

What it looks like