Delete or replace multiple instances of a quote in a field

Hello & thanks for looking.

I've not found a script or other action (batch) which can delete multiple instances of quotes " or replace multiple instances of quotes in a field. I appreciate any help you can give to these topics.

The following three examples are similar, but different. =====================================

  1. REMOVE MULTIPLE QUOTES (at different places)
    For example:

    John Lee "Sonny Boy" Williamson to John Lee Sonny Boy Williamson
    or, "Clarence "Pinetop" Smith to Clarence Pinetop Smith

    For example:

    "Baby, Scratch My Back" to Baby, Scratch My Back
    or, "Born Under A Bad Sign" to Born Under A Bad Sign

    For example:

" TO ''.
or John Lee "Sonny Boy" Williamson to ''John Lee Sonny Boy Williamson''

 (Note::yes, this looks the same, however, filenames can consist of apostrophes, but not quotes.) 


I am rather new to mp3Tag, however, I have been using it quite a bit, but the multiple instances of a character in a field has me baffled.

Thanks for your insights.

Here's the documentation:

To replace something with nothing, use $replace(string,from,).

Thank you very much. This should get me started. I will check "scripting functions" out.

Even though there is a scripting function for replacements, I still find them a little tricky esp. with apostrophes and quotation marks.
I would use an action of the type simple "Replace" which replaces one text constant with another fairly predictable and reliable.

Thank you ohrenkino. Good recommendation. I'll check out "Replace."

I'm currently overwhelmed with Mp3tag Help - Scripting functions, but will continue learning it.



I have studied the Scripting topic per [yerman and have been unsuccessful in using the "REPLACE" to remove the quotations. I am using the dialog boxes in mp3Tag v3.11. I have spent over 2+-days trying to understand it all & I have failed to grasp the syntax/logic. I've looked at many examples of ACTIONS & SCRIPTS on the website, but haven't been successful in finding anything helpful in my particular case of deleting quotations " in my TITLE field. (see the samples in my first email) I have written several simple ACTIONS, but the "quotations have got me.

I am not a programmer and whatever language mp3Tag uses is beyond me.

I would appreciate any specific guidance on how to solve my problem from an experienced individual who could take a few minutes of their time to help me.

Thanks for your consideration.


P.S. Is there a dummies book on whatever the language is? I'm the type that needs plenty of examples before it sinks in???

What have you done apart from reading? I mean you must have tried something otherwise you would not know that you were not successful. It is much easier to have something to build on in an attempt to help.

Actually, you don't need to use a special kind fo syntax/language. Replacing one string constant (here: quotation marks) with another (here: 2 apostophes) can be achieved with an action of the type "Replace" - and that acts more or less like any search/replace function in any odd program: you enter what should be looked for and then tell what it should be replaced with.
The only specific item would be the name of the field in which all this should happen - but that can be selected from a dropdown list (or entered directly).

An action can be stored as part of an action group or you could execute the action as an action (quick) - which is in many cases the preferred way when replacing.

I have tried using REPLACE. If you'd read my discussion you will see I've tried REPLACE.

Using the Actions Dialog box & following the syntax: Command: $replace(string,from,to) or $replace(string,from1,to1,from2,to2,...)

Goal: remove quotes (") and replace with nothing

$replace(TITLE,", )

Actions Dialog box for REPLACE

Field: TITLE
original: "
replace with: (nothing' left blank)

or shown in Actions Dialog box
Replace "TITLE":"""->""

BTW, I ask for guidance not prejudice.

I see.
Please note that scripting functions only work where you are requested to enter format strings.

This looks more like it. Did you succeed?

No, I did not succeed. The Action ran, but nothing happened.

If nothing happened than this would mean that there were no hits. I cannot tell from the distance, how accurate your input was.
One way to get the correct search term is to copy just that from a title and then paste it to "Original".

Here's the example I am using ====> "Sure, man, Go right ahead"

Using the REPLACE, as shown below, I copied the " from the first value of text in the TITLE field and the first " was removed, but the last " was not removed.

I reused the "Sure, man, Go right ahead" and copied the last " in the TITLE field. The Action removed the last ", but not the first "

So, the cut & paste worked to some extent, but not definitively.

Actions Dialog box for REPLACE

Field: TITLE
Original: " cut & paste beginning " or ending " used
replace with: (nothing entered left blank)

or shown in Actions Dialog box
Replace "TITLE"::"""->"" beginning " or ending " used

Apparently, the quotation marks are 2 different characters.
It is prossible to join the first and the second REPLACE action in an action groupso that you can call both actions in 1 go.

Yes, I created an action group to handle the (copied) beginning quotation, (copied) ending quotation and an actual quotation from my keyboard.

On the surface, the individual actions look the same, but they are not.

My action group looks like:

Remove Quotes from Title


My problem for REMOVE MULTIPLE QUOTES (at different places) has been resolved.

For a newbie this action was pretty complicated. I've never come across left and right quotes in my life. I was destined to fail from the beginning. Sending me, offhandedly, to read Scripting functions and leaving me to attempt scenarios with lame guidance was wrong; three days of spinning wheels and a forth day to solve the problem.

Anyway, I appreciate your help ohrenkino.


The participants in this forums are volunteers. And they usually answer as good as they can, sometimes dependent on their personal preferences.
So if an answer suggests the scripting functions then I have to say that it is not way-off but they have certain benefits, esp. if you want to replace simple pairs of strings in one go.
In your case, the list of pairs to replace could have been expanded to accents, apostrophes, double commas etc - whatever may be found in malformed texts.

When questions arise, it is never quite clear how deep the expertise of a poster goes - to find that out is an interative process with questions and answers as accurately as possible.

Now that you have found the possibility that there are different quotation marks ... you may also stumble over hyphens that look like a minus character but are not, slashes which cannot be entered with the key on the numeric pad, space characters that are different from the one generated by the biggest key on the keyboard. Oh, and l and I and | are also such candidates (a small L, a capital i and a bar character)
And if you don't see the difference even though you have the data right in front of you - how should we from the distance guess it?
With this I try to explain why the problem did not get solved in a straight line problem->solution.
What all this shows: tagging is tricky, don't give up telling the problem and trying to find a solution, stay friendly - all of us.
See you, when there is the next case.

Thanks for your insight. When you mentioned to copy from the actual text string & I saw the positive outcome, a lightbulb went off. I was able to proceed to a solution with this knowledge. Lesson learned: Beware of (what I call) phantom characters.


I have found this often happens with single and double quotes, or apostrophes. I believe there is some automatic replacements that happen on some OS versions, especially with Apple, that creates open and closed versions rather than to Microsoft standard keyboard versions. Same for a few other punctuation characters. Often when I have struggled like you to find or change a character, the copy/paste method is the ticket to success.

Glad you got it sorted out now. And sounds like you now have some scripting background for future benefit.:yum: