Sometimes my TTA files have tta or TTA written in their _FIENAMEs, i.e. before the extension
Something as simple as just replacing " tta" with disregard for case-sensitive comparison in TITLE field does the trick. And I use that single pause [i.e. " tta" instead of "tta"] as a fail-safe - but I would like to add another layer to it:
I need to make this action work only for files in TTA format, which will reduce the number of wrong usages thus error [thus data loss]
So how do I do that? I am guessing I would need to use Replace with regular expression instead of ordinary Replace
If you replace a text constant with another text constant (in this case constantly nothing) then you only need an action of the type "Replace".
I have just scanned my collection and found "Whole lotta love", "Gotta be strarting something", "Loretta", "Violetta" as part of a Verdi opera, "Outtake" as part of a title, "Attack of the clones" - so there are a lot of titles (and probably filenames) with tta in them
I also wonder how the presence of these 3 letters would lead to
If you really want to go that way, you could use something like this in your "Format value" action: $if($eql('TTA',$upper(%_extension%)),$repl(%TITLE%,' tta ',' '),)
Please don't use this abbreviated syntax!
As found in this bug report, the abbrevation of $repl instead of using $replace can result in unwanted changes. Always use $replace as stated in the help.
This would replace the text space tta space with a single space whenever the extension of the current file is TTA. You have to adjust it to your needs and use cases.
As @ohrenkino told you: This will also remove the bold marked text from titles:
Let tta and Cathode
or
Too young tta way
Either I am unable to imagine negative consequence - or both of you did not understand me
The data loss will occur precisely in such cases like @ohrenkino examples - if I will not use the first fail safe [i.e. " tta" with a pause]
Do you want to replace the tta string in all variations like tta, tTa, tTA, TTa, ttA, TTA?
Or what case should be ignored?
Later added warning:
Please don't use this abbreviated syntax!
As found in this bug report, the abbrevation of $repl instead of using $replace can result in unwanted changes. Always use $replace as stated in the help.
In $replace() is no fourth optional parameter to ignore the case, in fact
"Functions with variable parameter count (e.g., Replace) are limited to < 64 parameters"
They are unlikely but can happen, but as I am at it I should address altogether that very rare issue - but adding to the code all variants manually will be a tedious task
You can die only one death: either you use the filter and a plain replace action that ignores the case or you enclose the whole thing in a complicated $IF() but then you have to mention all iterations.