Help with regular expressions

Hello there. I have several tags starting with the format dd_mm_yyyy and I want to replace "_" with "" but only when it does appear between two numbers as above. Can you help me?

Yes, but please show us some real examples. Some where you want to replace "_" with "" and others which you want to be remain untouched.

I have things like 06_12_2016 TEXT_!_.mp3 and I need 06/12/2016 TEXT !.mp3

A slash / is not a valid character in filenames. You have to choose another character like - or you ommit it in a leading date DDMMYYYY.

Is this correct, you want to change
06_12_2016 TEXT_!_.mp3
into
06122016 TEXT!.mp3
You want to remove ALL occurences of underscores? Or do you want to remove the underscores only in the leading date as you wrote in your initial question.
06122016 TEXT_!_.mp3

Please be as specific as possible.

I know but it is for the tag of a song and I need to change the title, not the filename. I have been as specific as I can: I have 06_12 in the title and I need 06/12 because the titles of 72 song is in this format. I can't batch replace every underscore because it appears in other positions

In the time that we try to guess what you really want, you would have manually changed your 72 song titles with a 100% hit rate. If you don't want to do that, please show us your 72 song title with a screenshot from Mp3tag where this titles are visible. Maybe we can recognize a pattern there.

You won’t be able to use the β€œ06/12” in the filename, as the β€œ06” will become a folder based on windows structure prior to the forward slash. That is why the underscore or dash was suggested by @LyricsLover earlier in the thread. This is not something mp3tag can avoid for you.

I wrote the pattern! Here another exemple: I want to change the first part but leave untouched the last "_". As you can see in a TITLE dd/mm/yyyy is a viable thing

image
image

Please interviene only if you know what are you talking about.

image

You could try:
$regexp('02_03_2021 A chi dare il voto_','(\d+)_(\d+)_(.*)_','$1/$2/$3_')

On a personal note: participants in this forum contribute on a volountary basis. Their comments and contributions are usually to the best of their knowledge and well-meaning. This does include that there could be misunderstandings.
Any contribution usually means that participants spent their time and effort without any guaranteed reward.
If you do not like a comment then simply ignore it or if you have the impression that someone did not take everything into consideration but should have, then please try to give that feedback in away as constructive as possible.
In this case I would have expected something like "I wanted to change the TITLE, not the filename".

1 Like

This suggests you are looking for a FILENAME not a TITLE. Apologies if my comment was misguided, but this is what I was responding to regarding the slash.

Nice reply after one day on the forum. Perhaps provide better detail and scope moving forward to get the help you are asking for.