Remove words between round brackets + the brackets

Hi all,

I've got some files with words between round brackets in tags and filename and I want to get rid of the stuff like:
original: (We are) The Road Crew
what I want: The Road Crew

But this for multiple files at once where the words between brackets of course vary in length.

How do i do this?

Regular Expressions

Replace: (.+)\s*
With: (nothing)

What it means: ( followed by anything followed by ) followed by 0 or more spaces (which I assume you also wanted removed)

You're fantastic.

Thanks.

I don't understand, this does not appear to function as described.

I followed the instructions and came up with the following:

[#0]
T=4
F=TITLE
1=(.+)\s*
2=
3=0

[#1]
T=4
F=_FILENAME
1=(.+)\s*
2=
3=0

But this actually deletes everything, not just text between brackets and the brackets themselves. What am I doing wrong?

Looking around I think this is a better solution:

[#0]
T=4
F=TITLE
1= \(.+\)
2=
3=1

[#1]
T=4
F=_FILENAME
1= \(.+\)
2=
3=1

This also removes the space before the file extension which is otherwise produced.

Now I am going to try and work out conditional formatting so this action does not run on anything which has (Hidden Track) in the title/filename.

Does anyone know why double backslashes are removed from posts?

Been reading through the forum and have not been able to find what I am looking for.

Essentially I want to run the action I previously mentioned but filter any tracks which contain '(Hidden Track)' in the title/filename.

I have seen examples of $if statements but nothing like 'change files unless contains '(Hidden Track)''

I could run a filter in mp3 tag first but I would rather this was done with the action script. Any ideas?

You have to enclose the text that is supposed to be taken literally but contains backslashes into the backwards accent (accent grave)
like this

You cannot filter with an action.
You would have to to use $if() statements in actions.

If you want to come back to the initial problem to remove anything in parenthesis, it may also be a way to use an action of the type "Guess value"
Like
Source: %title%
Pattern: %title% (%dummy%)

Is this right?

[#0]
T=4
F=TITLE
1=$if2(\(Hidden Track\)),( \(.+\))
2=
3=1

[#1]
T=4
F=_FILENAME
1=$if2(\(Hidden Track\)),( \(.+\))
2=
3=1

Have you tried it? And how would I know, I do not have your set of data.

I tested it prior to adding the if2 condition and it removed anything between rounded brackets and the rounded brackets. I just tried it on a track which contained '(Hidden Track)' at the end and it did not remove the wording so I think it is correct.

Surely you can tell by looking at the coding?

If I were to develop this further, how could I make mp3tag look for 'Hidden Track' within rounded brackets but not specifically when it only contains the exact phrase '(Hidden Track)' but could include other words as well?

something like:
$ifgreater($strstr('Get Ready Hidden Track',$regexp('(We are) The Road Crew (Hidden Track)','.*\((.*)\)',$1)),0,yes,no)
In the example, strings with any single word or words following the order of the search string will be excluded in the "yes" action.

You have to enter the action for yes and the one for no.
Also, replace the string constant in the $regexp() with the correct field name.
The string constant in $strstr() can be appended by more or less any word or combination that you want to include in the blacklist.

Thank you so much for your reply.

If greater makes the code look for anything other than 'Get Ready Hidden Track' and it does not match, it replaces it with '(We are) The Road Crew (Hidden Track)'?

Would this be able to cope? I'm not sure I was particularly clear so what I meant was provided the phrase 'Hidden Track' is found within rounded brackets, the code should not delete anything within those brackets.

Here is an example of a track which I would not want to edit from Coldplay\Parachutes:

10 Everything's Not Lost (Includes Hidden Track 'Life Is For Living')

The expression that I supplied assumed that you have the string part "(Hidden Track)" in the title.
It was not at all clear that "Hidden Track" was somewhere inside the parenthesis.
In this case I do not see any possibility to get a certain set of words out of an amorphous string.
My attempt cut anything from inside the parenthesis and compared it with a list of keywords to then execute the true or false branch.
Just to make it clear: you have to have unique constant identifiers or separators to get a variable string or supply a string constant to evaluate a variable string. Having both as variables does not work in one action, you would have to treat each case separately and supply at least one constant.