Test, validate and match regular expressions
This PCRE regex uses conditional pattern syntax (IF-THEN-ELSE) to match 2-letter uppercase codes based on context. The negative lookahead condition tests if the current position is NOT before an 8-10 character alphanumeric code or at line start with 2 letters. If true, it matches 2 uppercase letters preceded by a 10-char code and space; otherwise matches standalone 2-letter words. Useful for parsing structured data with mixed code formats.