Test, validate and match regular expressions
Matches entire lines composed of the words "tac" and "tactic", with the constraint that the line must start with "tac". It uses a backreference trick: one alternation branch captures "tac" into group 2, while the other branch reuses it as \2tic to spell "tactic"; since \2 fails until group 2 has participated, the first repetition is forced to be "tac". With the gm flags, it validates each line independently in multiline text.