Search code examples
regexnotepad++

Regex to make last letter capital


SO i got regex to make first letter capital but i need now a regex to make the last letter caps, ive tried google searches and came up with nothing

Example of what im talking about

razor123

james333

firefire32923932

laser

Need them to turn into

razoR123

jameS333

firefirE32923932

laseR

Solution

  • Try this:

    Find: ^([a-z]+)([a-z][^a-z]*)$ Replace with: \1\U\2