Test, validate and match regular expressions
This regex splits every word into two capture groups: the first word character (letter, digit, or underscore) and the remaining characters of that word. With the global and multiline flags, it processes each word across all lines, making it ideal for titlecase or capitalization transformations where the first letter is uppercased via replacement while the rest is preserved. Commonly used in text normalization and formatting pipelines.