Test, validate and match regular expressions
Splits text into word tokens by matching either runs of characters that are not whitespace, hyphens, underscores, or uppercase letters (first group), or words that start with one or more uppercase letters followed by lowercase/digit characters (second group). Separators like spaces, hyphens, and underscores are skipped entirely. This is commonly used to tokenize camelCase, PascalCase, snake_case, or kebab-case identifiers into individual words for case conversion, code analysis, or text processing.