Test, validate and match regular expressions
Matches the literal token 'G1' when preceded by a word boundary and followed by a word boundary or the letters Q, S, or R. Ideal for finding model/version identifiers like G1, G1Q, G1S, or G1R while rejecting longer codes such as G12 or G1A. The zero-width lookahead means only 'G1' is consumed, and with the gm flags every occurrence is found on each line of multiline text.