Sublime Text: Regex to convert Uppercase to Title Case?

Steve picture Steve · Jul 24, 2013 · Viewed 32.5k times · Source

I have a bunch of labels in a text file (e.g. MY LABEL:) that I need to make title case.

I already know how I would make them all lower or upper case.

For example:

^([A-Z &#]+:) to \L$1

However, is there a simple switch-based way to get title case?

Answer

garyh picture garyh · Dec 6, 2013

Find: ([A-Z])([A-Z]+)\b

Replace: $1\L$2

Make sure case sensitivity is on (Alt + C) and preserve case is off (Alt + A).