#1 2013-02-25 02:59

bocaseca
Member
Registered: 2013-02-25
Posts: 5

Upper case in brackets only

I'm sorry if my post is wrong,

please, i need help, my brain is going to explode reading the forum, is very good, full of information but i only know 2% of english


i want to uppercase the first letter of each word, but only the words which are inside of ( )


e.g. 
               I'm stupid because i don't know english (very stupid)
             
               I'm stupid because i don't know english (Very Stupid)

Offline

#2 2013-02-25 10:09

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: Upper case in brackets only

Hi bocaseca and welcome.

Don't worry, your english is not bad.
As addition you can use g00gle translater,
or add an sentence or two in your mother tongue to clarify.

To solve your issue we have to use an PascalScript rule.
See our wiki > http://www.den4b.com/wiki/ReNamer:Rules:PascalScript


FROM:
I have to learn because i don't know ReNamer (It's not that heavy at all).txt

TO:
I have to learn because i don't know ReNamer (It's Not That Heavy At All).txt

USE:
1) PascalScript:

var
  Parts: TStringsArray;
  
begin
  //Enter an regex to split your BASE file name into parts to an array:
  Parts := SubMatchesRegEx(WideExtractBaseName(FileName), '^(.+?)(\(.+\))$', FALSE);
  If (Length(Parts) <=0) then exit;

  //Now build you new file name (a array starts counting at zero), and add the Extension:
  // Capitalize Every Word	WideCaseCapitalize
  // lowercase			WideLowerCase
  // UPPERCASE			WideUpperCase
  // iNVERT cASE		WideCaseInvert
 FileName := Parts[0] + WideCaseCapitalize(Parts[1]) + WideExtractFileExt(FileName);
end.

HTH?


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#3 2013-02-25 15:47

bocaseca
Member
Registered: 2013-02-25
Posts: 5

Re: Upper case in brackets only

Thanks a lot, you solved my problem at 100%, this is the most effective forum i ever seen,  thanks so much.

Offline

#4 2014-10-30 11:14

afh
Member
Registered: 2014-10-29
Posts: 3

Re: Upper case in brackets only

It would be nice to have the Case rule as advanced renamer has it:
case rule in advanced renamer

Offline

#5 2014-10-30 21:55

afh
Member
Registered: 2014-10-29
Posts: 3

Re: Upper case in brackets only

I'm really surprised for no opinion on this from administrator... I find it pretty useful. Using pascal script should be the last solution, I think...
No offense, but renamer should be over the free software...
L615bZE.png

fragments should be identified by the text between brackets according to regular expression rules (I hope I'm clear, I'm not a geek...)

Last edited by afh (2014-10-30 22:03)

Offline

#6 2014-10-30 22:29

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Upper case in brackets only

Case manipulations on patterns are supported via \u \U \l \L flags in RegEx rule.

More details and examples here:
http://www.den4b.com/forum/viewtopic.php?id=1857

Also explained here:
http://www.den4b.com/wiki/ReNamer:Regul … ipulations

In future, please don't resurrect old threads, start a new one.

Offline

#7 2014-10-31 08:37

afh
Member
Registered: 2014-10-29
Posts: 3

Re: Upper case in brackets only

Thanks!
I'm new on this forum and I searched for Case rule, but I didn't expect to have this implemented in regexp smile

Offline

Board footer

Powered by FluxBB