Replace character in filename, capitalized first character into lower case
How can I replace the capitalized first character of multiple words into lowercase characters?
I have this:
Jim Reeves - Am I That Easy To Forget. and I want to change that into this:
Jim Reeves - Am I that easy to forget.
I have this:
Jim Reeves - Am I That Easy To Forget. and I want to change that into this:
Jim Reeves - Am I that easy to forget.
Reply to #1:
The following solution assumes that all your filenames are in the form: <name><hyphen+space><text> - ie I'm using "- " as a separator.
Use two Replace methods (or two lines in a List replace method).
Select "Use regular expressions" in each case.
1) Set first character of text to upper case and all following characters to lower case...
Replace: ((.*)(- .))?(.)
With: \2\U3\L4
2) Replace "i" as single word with upper case...
Replace: (\si(\s|$))
With: \U1
A great resource for getting to grips with advanced Regular Expressions is www.regular-expressions.info
The following solution assumes that all your filenames are in the form: <name><hyphen+space><text> - ie I'm using "- " as a separator.
Use two Replace methods (or two lines in a List replace method).
Select "Use regular expressions" in each case.
1) Set first character of text to upper case and all following characters to lower case...
Replace: ((.*)(- .))?(.)
With: \2\U3\L4
2) Replace "i" as single word with upper case...
Replace: (\si(\s|$))
With: \U1
A great resource for getting to grips with advanced Regular Expressions is www.regular-expressions.info
Reply to #2:
Thanks a lot, I will try it. Stay safe and have a great 2021.
Thanks a lot, I will try it. Stay safe and have a great 2021.
Reply to #3:
In a single line...
Replace: (^.*?- \K(.))?((<i>)|(.))
With:: \U2\U4\L5
Occurrence: All
Use regular expressions
Replace < & > with square brackets in this regex.
In this forum "i" in square brackets: ([i]) is an instruction to display the following text in italics so it cannot be displayed!
In a single line...
Replace: (^.*?- \K(.))?((<i>)|(.))
With:: \U2\U4\L5
Occurrence: All
Use regular expressions
Replace < & > with square brackets in this regex.
In this forum "i" in square brackets: ([i]) is an instruction to display the following text in italics so it cannot be displayed!