Proper Case Converter
How This Converter Works
Capitalizes matches beginning with an ASCII word character and lowercases the remaining non-whitespace characters in each match.
Formula or rule
Replace each /\w\S*/ match with uppercase(first character) + lowercase(rest). JavaScript \w is ASCII letters, digits, and underscore.
Example
- Input
- hELLO, wORLD!
- Calculation
- The matches hELLO, and wORLD! become Hello, and World!.
- Result
- Hello, World!