capitalize first letter after an hyphen

A swapping-ground for Regular Expression syntax

capitalize first letter after an hyphen

Postby italian_guy » Mon Nov 05, 2007 3:10 pm

Hallo. I'm trying BRU but i'm not able to solve a problem.
Let's suppose I have a directory that contains file like this

file - text text text again.

I'd like to capitalize the first letter after the hyphen to obtain

file - Text text text again.

In the field match i wrote ([a-z]*) - ([a-z]+*)
and in the field replace \1 - \2

but how can i capitalize the first letter of \2.
Thanks in advance and sorry for my english. :D
italian_guy
 
Posts: 5
Joined: Sun Nov 04, 2007 11:28 pm

Postby Stefan » Mon Nov 05, 2007 3:31 pm

Hy italian_guy, welcome.

That's not that easy with BRU.

See here
http://www.bulkrenameutility.co.uk/Foru ... c.php?t=19

and here
http://www.bulkrenameutility.co.uk/Foru ... .php?t=175
http://www.bulkrenameutility.co.uk/Foru ... c.php?t=47

or even here
http://www.bulkrenameutility.co.uk/Foru ... c.php?t=20

--------------------------

I will think on an solution.
Maybe the Character Translation will help you too?

Ctr+F6
-, ,a=-, ,A
-, b=-, ,B
...
-, ,t=-, ,T
...

See here (scroll to the end)
http://www.bulkrenameutility.co.uk/Foru ... .php?t=105
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Postby italian_guy » Mon Nov 05, 2007 8:17 pm

Wow, this character translation function is awesome and really useful. :D
Thank you very much Stefan, you've been very kind and avoid me to rename manually thousands of files.
Thanks again, even for the welcome. :D
Good evening.
italian_guy
 
Posts: 5
Joined: Sun Nov 04, 2007 11:28 pm

Postby italian_guy » Mon Nov 05, 2007 10:33 pm

Hi, i'm here again because i have another question. :oops:
I read a lot of threads in this forum but i didn't find a solution to capitalize just the first letter of a file.
Do you have any idea? Thanks!
italian_guy
 
Posts: 5
Joined: Sun Nov 04, 2007 11:28 pm

Postby Stefan » Tue Nov 06, 2007 10:01 pm

Sorry i miss this post.

italian_guy wrote:Hi, i'm here again because i have another question. :oops:
No matter, your are welcome.
I read a lot of threads in this forum
Good boy :lol:

find a solution to capitalize just the first letter of a file.
Do you have any idea? Thanks!
I would try rule #4 CASE and choose Sentence.
In English they wrote only the first letter upper case in Sentence and don't care for the rest :lol:
So Case > Sentence would solve your request i think.

In the field "Excep" you can also wrote some names like BRU, DJ, ABBA,... which you perhaps want to cover from modifying.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Postby italian_guy » Wed Nov 07, 2007 7:22 pm

Thanks again Stefan for your reply.
I didn't explain in a clear way my doubt.
Trying the various options of BRU I'd already seen the option Sentence but, for instance, I have files in this form

text - Text text.txt

with sentence the file becomes

Text - text text.txt

while i'd like to capitalize the first letter of each file but i don't want to modify the first letter after the hyphen.
Is there a way to modify the first letter of each file leaving intact the rest of them?
I hope I have been more clear this time. :D
italian_guy
 
Posts: 5
Joined: Sun Nov 04, 2007 11:28 pm

Postby italian_guy » Wed Nov 07, 2007 7:27 pm

Maybe i had to first use sentence to capitalize my files and then use the character translations to solve the problem i posted before.
italian_guy
 
Posts: 5
Joined: Sun Nov 04, 2007 11:28 pm

Postby Stefan » Wed Nov 07, 2007 8:58 pm

italian_guy wrote:Maybe i had to first use sentence to capitalize my files and then use the character translations to solve the problem i posted before.

I too think this will be the right order :wink:


Please post again if you have more questions or more better if you are successfully at last.
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions