Replace the first occurrence

Hi, I want to replace the first occurrence of a point "." with a space + dash " -" of some columns. Is it possible?

Thanks

This is for the column names, or the data in the list? Perhaps post a screenshot of what you have now, and describe in detail what you want to change.

I want to change the data in the list (title and filename), this is the screenshot:

You could try an action of the type "Format value" for TITLE
Format string: $regexp(%title%,'(.*?)\.(.*)',$1 - $2)
This leads from "142 Numeri. Capitolo..." to "142 Numeri - Capitolo ..."

The format string works good with a glitch: a double space to the right of the dash. I don't understand the syntax of string, is it possible correct it?
Thanks

Please try
Format string: $regexp(%title%,'(.*?)\. (.*)',$1 - $2)
or
Format string: $regexp(%title%,'(.*?)\.(.*)',$1 -$2)

It seems that both work perfectly even they are different, this is disorienting to me...

With the new format, tag switchs from ID3v2.4 to ID3v2.3. Is it normal?

Maybe it helps if you understand the function of (.*?)\. (.*)
(.*?) looks for and groups every character BEFORE the first
\. dot and a space
(.*) looks for and groups every character AFTER the above dot and space

If you prefer it as picture:

Then the content of %TITLE% (the 2 groups with the collected characters) will be replaced like this
$1 content of first group
- a space a minus/dash and a space character
$2 content of the second group

This depends on the settings you have in File>OptionsTags>Mpeg.
ID3V2.3 is still the tag version that is supported by most players.

Thank you all for your help and useful explanations

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.