Search code examples
sublimetext

Replace uppercase with lowercase letters


I'm trying to replace uppercase letters with corresponding lowercase letters using regex. So that

EarTH:   1,
MerCury: 0.2408467,
venuS:   0.61519726,

becomes

earth:   1,
mercury: 0.2408467,
venus:   0.61519726,

in Sublime Text. How can I downcase letters only in words that contain both lower and uppercase letters? So that it affects venUs and not VENUS.


Solution

  • You may:

    Find: (\w) Replace With: \L$1

    Or select the text, ctrl+K+L.