Remove random number in title


Thanks to the forum, I managed to make some big changes on the title of the podcast i downloaded
Filename to tag, make action group to add and remove text on title and thing like that. However I'm not so good with the regular expressions or scripting, not sure what you calls it.

So here's the last problem i'm facing.

the podcast file name is something like this



while 91fc, c7d6, f5c1 are random numbers and char

They all don't have titles.
i've managed to put titles and add the date to the title also remove revolution_ using action group.

so the title look like this.

2010-11-26_1_91fc_Bele Bala 女同事



So i'm wondering how can i remove the random numbers and char.

The action group i use is
Field: TITLE
Regualr expression: ^\l*_

Is there anything i can add to the action group to remove those random numbers and char or should I make another action group and what would it be?

Thanks for the help :slight_smile:))

Use the following:

Action type: Format value
Field: TITLE
Formatstring: $regexp(%title%,'^(\d{4}-\d{2}-\d{2}\d+)[\w]+_(.+)',$1$2)

Thank you It works perfectly :slight_smile:

I can understand the meaning of most of the code.
If I want to learn about the expression. where can I find tutorial. I'm looking at the help page but it didnt say much.
I can understand ^(\d{4}-\d{2}-\d{2}\d+), but not [\w]+_(.+)',$1$2) and the use of ' '

Thanks again

No prob, I've attached this screenshot of the program where I basically learned regexp. Its called 'RegexBuddy' See the video for it HERE.

ATTACHMENT Study this :book: Notice where you can put the specific text you want in the box and it automatically brings back the result.

In it states that:
\w Any word character - all alphanumeric characters plus the underscore

Wrapping that in '[]' doesn't make any difference in this case.

For the ' ' in the regexp states there that:
,() These characters must only be escaped when they are inside a scripting function.

As you can see there is so thats why. Is the same for the part of $regexp(what,expr,repl) highlighted bold. If you want the repl to have a ,() then you have to escape it otherwise it won't work.

But to learn more this is a good place to start:

regexp is really additive once you start and its a godsend when you want to batch rename files on your computer not JUST your audio files.

haha thank you. I understand a bit more again now. :laughing:
Still trying to understand what escape means. Is that why you have to use '' ? for "escape"?

yeah actually just know about regexp not long ago. I just start to know I can use it to edit text with notepad++, only the basic stuff tho.
just started to use mp3tag, I have a collection of songs. It should be useful to make changing to them.

Thanks a lot with the link. gonna take time to learn about it now.
How long does it take for you to become good at regexp ? :stuck_out_tongue:

the the following regexp ^(\d{4}-\d{2}-\d{2}\d+)[\w]+_(.+) must be wrapped with '' because it contains both ( and ). The can be said for the , character.

if you get stuck in prob a couple of days.

I just googled :ph34r: a free tester and came back with this wedsite so just type in the bottom box the specific text you want to match the it will give you live feedback as to what's doing what.

Glad to be of help.