Tenth
June 13, 2022, 9:56am
#1
Hi there,
I am currently using this code:
$regexp($upper(%artist%),'(?#From "The Artist" to "Artist")^(?i)(?:the|der|die|das)\s+',) - $caps(%title%)
for: ABBA - The Winner Takes It All (has To Fall) ,
but it should be this way: ABBA - The Winner Takes It All (Has To Fall)
I'd really appreciate it if someone could modify my code for this.
I've tried it in many ways, but failed so far
Thank you so much.
I am not sure what the regular expression should do there if you do not reference any search result.
I would try "Format value" with
$caps2('ABBA - The Winner Takes It All (has To Fall)','(')
-> "ABBA - The Winner Takes It All (Has To Fall)"
bo210
June 17, 2022, 10:40am
#3
unfortunately it didn't work , the first word in the brackets is still in the lower case:
(has To Fall)
As I tried it with the string from the example and the result was as shown you now have to show, preferably with a screendump the original data and the action that you used.
you are missing the parameter to set the word separators:
ohrenkino:
fall)','(')
bo210
June 17, 2022, 11:19am
#7
I am really sorry, I can't figure this out
I'd appreciate it, if you just paste the entire code-line here.
Cheers
$caps2(%title%)
should be
$caps2(%title%,'(')
bo210
June 17, 2022, 11:52am
#9
Thank you ... but there's a new problem now with the partial old problem there
with this:
$regexp($upper(%artist%),'(?#From "The Artist" to "Artist")^(?i)(?:the|der|die|das)\s+',) - $caps2(%title%,'(')
now, I'm getting this
ABBA - The winner takes it all (Has to fall)
and all I wanted to have it like this:
ABBA - The Winner Takes It All (Has To Fall)
where am I still doing it wrong?
Yeah, as you gave
as source string, all the other words where already in capitals and they were to be left alone.
So,
$caps2(%title%,'(')
becomes
$caps(%title%,'( ')
bo210
June 17, 2022, 12:10pm
#11
yeah ... finally !!!
thank you so much for your patience and time
wotu2
June 23, 2022, 1:27pm
#12
Nice to see it's fixed
What about this:
The beatles - Back in the U.s.s.r (how Lucky You Are)
Should be like this:
BEATLES - Back In The U.S.S.R (How Lucky You Are)
What do I add to the current code or what should be the full code for this?
Thanks a lot.
$caps('The beatles - Back in the U.s.s.r (how Lucky You Are)', '('.)
and further information in
There is no automatism to convert "The beatles" into "BEATLES".
If you really want that, you have to specify a replacement with code like this
$replace(%ARTIST%,The beatles,BEATLES)
This would replace The Beatles
saved in your ARTIST tag with BEATLES
in the same ARTIST tag.
Please be aware, that such a replacement ist case sensitive. It would not work for an ARTIST The Beatles
(with a uppercase B) until you use the $upper function.
Thanks to @ohrenkino I just realized, that you want to use it with the mentioned code.
I assumed that this was the originally used code.
1 Like
wotu2
June 23, 2022, 1:45pm
#17
Yes, exactly ..... brilliant
wotu2
June 23, 2022, 1:48pm
#18
@ LyricsLover
see [ohrenkino]'s last post.
thank you
1 Like