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?
Search functions in Sublime Text support regular expressions, a powerful tool for searching and replacing text. Regular Expressions find complex patterns in text.
This can be done easily using regular expressions. In a substitute command, place \U or \L before backreferences for the desired output. Everything after \U , stopping at \E or \e , is converted to uppercase. Similarly, everything after \L , stopping at \E or \e , is converted to lowercase.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With