How to remove part of title field

I have title field like this: №2 f-moll (op.70)
sometimes like this: Три блестящих вальса №1 As-dur (op.34)
So, as you can see it has 3 chunks (7 chunks in 2-nd example) of info separated by space. I want to delete 3-rd chunk (or 7-th).
How can I do that?
I tried "Guess values" with: %title% %title% %dummy%, but it won't work.

If that part is always in parenthesis, you could try an action of the type
Guess value
Source: %title%
Format string: %title% (%dummy%)

1 Like

Wow, this is such great solution! Yes, in my case it's always last chunk. Thank you so much!

Just for the record: @Avtem
If you remove this last "chunk **" (as you name it) how do you identify such a song later?
With only "№2 f-moll" as title, it is pretty hard to know what song this could be. Even in combination with the artist you get several possible results.

** Opus =

I name them like this now: Prelude №2 f-moll
or valse, sonata etc.

Edit: Well, I've learned a little bit about Regular expressions and now I know how to solve the problem.

  1. Select songs with same pattern. For example I choose this: Prelude №2 f-moll (op.38). As we can see titles always have 4 parts separated by space, so now we know how the pattern looks.
  2. Press [Alt+Shift+6], choose Replace with regular expression
  3. Select a field what you want to change (title, filename, album, whatever)
  4. (This step you have to check for yourself)
    In the field Regular expression paste (\S+) for every part of the pattern (in our case we have 4 parts) separated by spaces. And we've got this:

(\S+) (\S+) (\S+) (\S+)

  1. In the field Replace matches with do whatever you wan't with the parts using
    $1 $2 $3 $4. Where $3 in our case means following: f-moll
    So, I'll write here this: $1 $3 $2

Result will be: Prelude f-moll №2

The analysis of the pattern can always be formal or semantically.
You have chosen the formal way.
The semantical way could look like this:
you have a string in front of "№" followed by a digit and you have a following string up to a an opening bracket.
So the pattern could look like this:
Search string: (.*)(№\d+)(.*)\(.*
The replace string stays the same.
The advantage is that the search string would also cater for
Три блестящих вальса №1 As-dur (op.34)
which has more blank-separated string parts in front of the № than just one.

Wow! This is really smart solution in my case. I think the regex (. *)(№\d+)(.* )(.* could be wrong.
I've changed it a little bit, so now regex looks like this: (.+)(№\d+) (\S+).+ and field "Replace matches with" like this: $1 $2 $3.
However, my question was about "detecting" parts separated by whitespace and possibility to work with every single part. So I hope it will help those people are looking for this

Edit: there is even simpler solution - just remove last part and a space. However I haven't figured out how to do this. I tried \S+\s$ but it doesn't work.