Capitalize only the first letter after the first dash

Advanced Renamer forum
#1 : 10/06-21 08:28
Kalina
Posts: 2
How to convert only the first letter to uppercase after the first dash separator?
Example:
From: any text - any. any text - any text
any text - ANY. ANY Text - ANY TEXT
To: any text - Any. any text - any text

edited: 10/06-21 08:32
#2 : 10/06-21 11:06
David Lee
Posts: 1125
Easy - when you know how!

Use a Replace method with a regular expression. The trick is to use \Ux and \Lx instead of \x in the replacement string. These return the xth captured group converted to upper and lower case respectively. This is not included in the basic introduction to regex in the User Guide but see www.regular-expressions.info/refreplacecase.html for more details.

So...

Replace: (- *\w)(.*)
with: \U1\L2
Use regular expressions

#3 : 10/06-21 20:52
Kalina
Posts: 2
Reply to #2:
Thank you David. The solution working also in Notepad++.
Replace with: $1\U$2\L

edited: 10/06-21 20:59