Build, test, and debug regular expressions
Matches digit groups at each position where a thousands separator should be inserted, enabling search-and-replace to format numbers with comma grouping (e.g., 1234567 becomes 1,234,567). The \G continuation anchor chains consecutive matches within the same number, while lazy \d+? combined with the lookahead ensures each match leaves a multiple of three digits remaining before the word boundary. A classic PCRE2 pattern for adding thousand separators to large numbers.