How to: Use an apostrophe as an apostrophe


#1

Hello!

I'm trying to use the Tag - Tag function to change the titles of a bunch of mp3s at once to just a string of text and the track number (it's an audiobook ripped from CD).

I'm trying to use: Shadow's Edge %track% in the Format String box
to avoid editing each of the 301 tracks one at a time, but the apostrophe as I understand it is seen as part of the REGEX syntax and so throws a syntax error unless I add a second apostrophe, but if I do that then both disappear in the end result.

It seems like it would be really simple but I can't figure out how to get it to ignore the one apostrophe and count it as just part of the text. Read the FAQ and did some searching, but didn't find anything.

Is there some way to tell it to ignore the one apostrophe? :flushed:

Any assistance would be much appreciated. Thanks!


#2

Use a quick action instead of the Tag - Tag converter.

Hit the 'Aa' button that says 'Actions (Quick)' and use a 'Format value' action.

Action type: Format value
Field: TITLE
Format string: Shadow's Edge %track%


#3

Hmmm, I tried it, but I end up with the title of every track being [ SYNTAX ERROR IN FORMATTING STRING ], so even with the Quick Action it's still trying to process the apostrophe under REGEX.

Drat, was hoping that would do it.
Does REGEX have a way to denote a given set of characters as just a text string? Or exclude it from syntax processing?

Thanks!


#4

Oops. Use this instead. Two single quotes to output one:

Format string: Shadow''s Edge %track%


#5

Ah Ha! Got it! :w00t:

I was testing different characters looking for some way to denote the whole thing as a string, for example "Shadow's Edge %track%", and tried apostrophes, again they just disappeared but for the heck of it I added another to the end and got the syntax error back, curious I added a third and discovered that it then left one apostrophe at the end.

I thought maybe I would have to do something like: Shadow'''s Edge %track%
but that got me the syntax error again. I then remember that the first time it left one there had been a fourth apostrophe in Shadow's, so I tried using just two, like this: Shadow''s Edge
and bam! It left me one beautiful apostrophe right were I needed it.

No idea what effect that would have if you were trying to use other REGEX strings as well, but if all you need is a single apostrophe put two and it should leave one. :laughing:


#6

Just figured that out. :laughing:
So simple, and yet so not what I was expecting.

Thanks! This'll save me a considerable amount of time. I'm a bit on the OCD side when it comes to these things, so where a lot of people would have just shrugged and moved on without the apostrophe I would have edited every track manually if I'd had to. :laughing:


#7

That's not called Regex.

It's Mp3tag scripting language and you can read more about in the help file:
http://help.mp3tag.de/main_scripting.html


#8

facepalm
I see. And here I skipped the scripting page because it sounded way more complicated than I was trying to do and went straight from the FAQ to searching (for the wrong things apparently). <_<

Thanks