Test, validate and match regular expressions
This regex matches digit groups in a number that need a thousands separator, specifically capturing 1-3 digits that are followed by one or more groups of exactly 3 digits (with an optional decimal part at the end). It is used to insert commas into large numbers for readability, e.g., converting 1234567.89 to 1,234,567.89. Common in text processing, data formatting, and financial applications.