Capitalize first letter of each word only?

Bulk Rename Utility How-To's

Capitalize first letter of each word only?

Postby shmellyman » Fri Apr 28, 2023 5:17 pm

Is it possible to only capitalize the first letter of a word but leave the rest of the letters untouched?

For example "thisIsJustanExample andIWant I want itTo work likeThis." to "ThisIsJustanExample AndIWant I Want ItTo Work LikeThis."

I hope the example clarifies what I'm trying to do. To ONLY capitalize the first letter of each word that is separated with a space, unlike what the "case>title" function would do.
shmellyman
 
Posts: 9
Joined: Thu May 06, 2021 9:13 am

Re: Capitalize first letter of each word only?

Postby therube » Fri Apr 28, 2023 7:45 pm

4:Case -> Title Enhanced --> Exception: <ic>
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Capitalize first letter of each word only?

Postby shmellyman » Sat Apr 29, 2023 3:05 am

therube wrote:4:Case -> Title Enhanced --> Exception: <ic>


Thanks for the hint, but it doesn't seem to be working on my end.
shmellyman
 
Posts: 9
Joined: Thu May 06, 2021 9:13 am

Capitalize first letter of each word

Postby Luuk » Sat Apr 29, 2023 4:40 am

With RegEx(1) having a checkmark inside for "v2", then the "Match" and "Replace" could be like...
(^.| .)/g
\U$1

But if needing some exception-words, can add them to the "Match" with something like...
(^.| (?!(a|at|in|of|on|the|to) ).)/g
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Capitalize first letter of each word

Postby shmellyman » Sat Apr 29, 2023 2:59 pm

Luuk wrote:With RegEx(1) having a checkmark inside for "v2", then the "Match" and "Replace" could be like...
(^.| .)/g
\U$1

But if needing some exception-words, can add them to the "Match" with something like...
(^.| (?!(a|at|in|of|on|the|to) ).)/g


Thanks but this seems to only capitalize the first letter of the first word in the filename, unless i'm doing something wrong. I would need to it capitalize the first letter of every word.
shmellyman
 
Posts: 9
Joined: Thu May 06, 2021 9:13 am

Capitalize first letter of each word

Postby Luuk » Sun Apr 30, 2023 2:46 am

The only thing Im guessing, is that maybe you typo'd \u instead of \U inside of the "Replace" ??
If still its not conducting for you, please to post the BRU's version number for troubleshooting.
This how it should be conducting...

one tWo tHRee fOur fIve six seven eight nine ten ----------> One TWo THRee FOur FIve Six Seven Eight Nine Ten
thisIsJustanExample andIWant I want itTo work likeThis ---> ThisIsJustanExample AndIWant I Want ItTo Work LikeThis
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Capitalize first letter of each word only?

Postby therube » Tue May 16, 2023 6:49 pm

it doesn't seem to be working on my end.

You're right.

I misread what it said:
<ic> : can only be used with Title Enhanced. Ignore all words that are all caps, do not change capitalization for them.

The pertinent part:
words that are all caps

So <ic> would handle HANDLE, but not hAnDlE.

---

BTW, what Luuk posted looks good:
Code: Select all
thisIsJustanExample andIWant I want itTo work likeThis
ThisIsJustanExample AndIWant I Want ItTo Work LikeThis
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To