Convert Artist and album of the artist in a title capitalized.

Hello, I would like to know how to if for example the title of my songs happens to be the name of my artist or album of the artist for his latter capitalized but have the rest of the way without changing the nival majuscle sensitive. Thank you.

I hope I got that right - google translate does a lot of funny things: "changing the nival majuscle sensitive" ...

Create an action of the type "Format value" for TITLE
Format string: $replace(%title%,%artist%,$upper(%artist%))

This puts - if it finds the contents of ARTIST somewhere in TITLE - the artist all in capitals, e.g.

"Avril Lavigne - Anything but Ordinary" -> "AVRIL LAVIGNE - Anything but Ordinary"

I think we understand it but it does not.

I just capitalize the title part that includes the artist's name in it and the rest of the way nothing changes.

ARTIST: ATYPUS
TITLE: atypus - Real blade
After the convertion TITLE: ATYPUS - Real blade

but it does not work with your code.

It does not work with "my" code because your artist field does not match the case in the title.
If the artist part in title is all lower case use this:
$replace(%title%,$lower(%artist%),$upper(%artist%))

Sorry, I understood, but I wanted to have it is a corespondance My artist in my title whatever it is written and capitalize the name of the artist who is in my title.

example:

ARTIST: ATYPUS
TITLE: atypus - Real blade
ou
TITLE: Atypus - Real blade
ou
TITLE: ATYPUS - Real blade
ou
TITLE: ATyPuS - Real blade

Result: ATYPUS - Real blade

I cannot think of any regular expression that switches the case of a pattern variable.
The only way out seems to me that you first filter all tracks where the artist is in the title, then you extract that artist into a separate user-defined field where you can swap the case and then you add that string again to the title.

$regexp($lower(%title%),$lower(%artist%),$upper(%artist%))
leads unfortunately to the rest of the title being in lower case ....

PS: a personal note: why do you have to have the artist in the title when you already have got it in the artist field? - I would delete it from the title.
Why is the case so mixed up?
Why does the artist name have to "yell" at you in capitals?
Don't answer any of these questions. They were just rethorical ones.

try this:

$if($strstr(%title%,%artist%),$regexp(%title%,(.) - (.),$upper(%artist%) - $2),%title%))

Story just for you die not stupid, it is rather the albumartist I would like to change.

I always name my artists and albumartist ALL CAPS. Better visibility for me. My titles are appointed with a capital at the beginning of the sentence with some phrase more like '|.!? &' And some others. Proper names which happens to be in my title are made with a word beginning capitalized.

It happens that sometimes in my title is found to be included albumartist. Yes, because for compilatons the title is sometimes called with albumartist because I called in this case the artist with the name of the compilation and albumartist with the actual name of the artist.

Because, yes sir, I'm a man complicated. I like having my tags in a way no other. So am in life, I would never do anything like the others.

Thank you for your help, I have tried your code and it is well. A+ :stuck_out_tongue:

I saw that you had changed your topic suddenly the new code to me, but a break like that) at the end of the title?

With the new code there is this) has the end of my title?

I had to take care of the family.
See if the
$if($strstr(%title%,%artist%),$regexp(%title%,(.) - (.),$upper(%artist%) - $2),%title%))
should be
$if($strstr(%title%,%artist%),$regexp(%title%,(.) - (.),$upper(%artist%) - $2),%title%)
(Can't test it at the moment)

The following code is well.

$if($strstr(%title%,%artist%),$regexp(%title%,(.*) - (.*),$upper(%artist%) - $2),%title%)

Thank you of your time and of your energy past found a solution. Yo.

$if($strstr(%TITLE%,%ARTIST%), ============================== $regexp(%TITLE%,(.*) - (.*),$upper(%ARTIST%) - $2) ,%TITLE%) ========= My condolences ... the underlined part of the formatstring is syntactically "murks" or "scrap", ... this instruction has no functionality, therefore you can remove it.

Simply use this formatstring:

$regexp(%TITLE%,'(.+?) - (.+?)','\U$1 - $2')

... or ...

$upper($left(%TITLE%,$strstr(%TITLE%,' - ')))$cutLeft(%TITLE%,$strstr(%TITLE%,' - '))

... or ...

$upper(%ARTIST%)' '$cutLeft(%TITLE%,$strstr(%TITLE%,' - '))

DD.20150402.1106.CEST

Thank you I again tried both code view higher, he walks well has the exception of titles. I do not know why. Whether he is to spell with capital letters or without.

$if($strstr(%title%,%albumartist%),$regexp(%title%,(.*) - (.*),$upper(%albumartist%) - $2),%title%)

TITLE:Finale / Reprise (orchestra - only version)
Result: DANNY ELFMAN - only version)

$regexp(%TITLE%,'(.+?) - (.+?)','\U$1 - $2')

TITLE: Finale / Reprise (orchestra - only version)
Result: FINALE / REPRISE (ORCHESTRA - Only version)

Your current new example ...
now working with the tag-field %albumartist% ...
using this formatstring ...

$if($strstr(%title%,%albumartist%),$regexp(%title%,(.) - (.),$upper(%albumartist%) - $2),%title%)

TITLE:Finale / Reprise (orchestra - only version)
Result: DANNY ELFMAN - only version)

is a bad scripting example like the other one forementioned.

$if($strstr(%TITLE%,%ALBUMARTIST%), =================================== $regexp(%TITLE%,(.*) - (.*),$upper(%ALBUMARTIST%) - $2) ,%TITLE%) ========= My condolences ... the underlined part of the formatstring is syntactically "murks" or "scrap", ... this instruction has no functionality, therefore you can remove it.
$regexp(%TITLE%,'(.+?) - (.+?)','\U$1 - $2')

TITLE: Finale / Reprise (orchestra - only version)
Result: FINALE / REPRISE (ORCHESTRA - Only version)[/quote]

The given formatstring works as designed, ...
the result complies with the rule of the given regular expression.

Note:
You should strictly avoid to mingle things together, which are not member of the same case.

This input string ...
'Finale / Reprise (orchestra - only version)'
... has not the right format to be treated in a correct fashion using this formatstring ...
$regexp(%TITLE%,'(.+?) - (.+?)','\U$1 - $2')

... but all the example cases, which you gave at the beginning of this thread ...
ARTIST: ATYPUS
TITLE: atypus - Real blade
TITLE: Atypus - Real blade
TITLE: ATYPUS - Real blade
TITLE: ATyPuS - Real blade
... can be treated without any error ...
... with this formatstring ...
$regexp(%TITLE%,'(.+?) - (.+?)','\U$1 - $2')

As a final good-intentioned response:
do change your working behavior in relation to your tagging and data handling.

Invest more time for the care of the individual tag fields, ...
then you can use the content from the tag-fields to assemble each complicated file name as you like.
Doing this way, you will save much more time, than you need now for struggling with formatstrings, for which you are not able to read and understand.

DD.20150402.1212.CEST