Reverse characters in the title which are not English chars

Hi,
I have some problems with some of my music,
I have music with Hebrew/Arabic names (name is right to left)
To be able to see them in my Dj software (Traktor) I need to reverse the name,
but If I use the reverse function like this: "$reverse(%title%)" it's reverse all the title name, even if there are some English chars or numbers in the title
e.g I want to reverse this: Example - דוגמא
To this:
Example - אמגוד

There is a way to do that with something like regular expression so it will ignore a-z, A-Z and 0-9?

Thanks a lot!

Could you please give us an example of such a mixed string?

Would this be something like
ABC 01 דוגמא
and you like to get it reversed to
ABC 01 אמגוד

Yes indeed, this to exactly what I want to do

Are there also combinations where it looks like this:
ABC 01 דוגמא CDE 02 דוגמא G

Might sub some like:

140BPM דוגמא -דוגמא (Extended)

But not any advanced combinations

Try in an action of the type "Format value" for TITLE:
$replace(%title%,$regexp(%TITLE%,([a-zA-Z0-9\s\(\)\/]),),$reverse($regexp(%TITLE%,([a-zA-Z0-9\s\(\)\/]),)))


No, don't try it - it does not work.

1 Like

I am a little puzzled: the DJ program cannot cope with these characters?

In MP3tag it looks like WIndows does some magic if it discovers such characters and reverses the reading order.
Also, if you select the text in such a field and right-click on it, you can force the reading LTR or RTL.
@lyricslover and me tried a lot of expressions with $replace(), $reverse() and $regexp() and we could not get it to work in a mixed string.

Which brings me back to the DJ software - I would ask the publishers of that software whether they can do anything about your problem - is it looks like a display problem in their software.

Just for the record
דוגמא-דוגמא translates "example-example
אמגוד-אמגוד translates Amgood-amgood
So will the whole effort to a sensible result?

Unfortunately, the DJ program (Traktor) doesn't have a proper solution for this, this issue is relevant for both Hebrew and Arabic languages (both languages are RTL),

If you have the option to contact the owner of the software and tell them about the problem I would really appreciate it since it's a visual thing in the code,

While waiting for an answer here I also built a Python script that reverses the title name while ignoring any chars not in the Hebrew alphabet.

If I did it in like 40 minutes I bet Native Instruments (Traktor owners) can do it also :slight_smile:

Thanks a lot, I really appreciate your time and afford to assist me

I think this is beyond the scope of what mp3tag is designed to do. Furthermore, the forum and users should not be expected to reach out to other software developers to improve or correct their product. This will need to be something you seek there for further support.

2 Likes

We are still at it in way. The problems that we found run around the space character as that gets removed with the regular expression and that makes the source string and the comparison string not to match.
I created an action group of 4 actions:

  1. Format value for (user-defined) INVERS1:
    Format string: $regexp(%TITLE%,'([a-zA-Z0-9\s\(\)\/])',)
  2. Format value for (user-defined) INVERS2:
    Format string: $reverse($regexp(%TITLE%,'([a-zA-Z0-9\s\(\)\/])',))
  3. Format value for TITLE
    Format string: $replace(%title%,%invers1%,%invers2%)
  4. Remove fields: invers1,invers2

This turns
140BPM דוגמא-דוגמא (Extended)
into
140BPM אמגוד-אמגוד (Extended)

+1 :+1:

This is especially true for a product like DJ Traktor that is sold for money and for which support is promised by the manufacturer («Native Instruments»).

Yes I can understand that, I don't know what I think while writing this :smiley:

Hi bro :slight_smile:
did you manage to fix it ?
I was just about to open a discussion about the same thing and it offered me this discussion instead :slight_smile:

I think the bottom line was: contact the player's support.