how to trim filename?

Filename: Jay_Mexx_-Plastic(Original_Mix)_[Deep_Records-DRS245]

Need output: Jay_Mexx_-Plastic(Original_Mix)_[Deep_Records]

How to use $trimRight for remove "catalog number" from filename, including "-" ?

Maybe:

in: %1[%2-%3]

out: %1'['%2']'

How to make this action for batch processing?

For sure set Mp3tag Filter to ...
"%FILENAME%" MATCHES "^(.+?[.+?)-.+?(])$"

... then apply "Convert Tag - Tag" ...
... or Action "Format value" ...
Field: _FILENAME
Formatstring: $regexp(%FILENAME%,'^(.+?[.+?)-.+?(])$','$1$2')

... or ...
in case of the trailing sequence has always the same length, ...
then apply "Convert Tag - Tag" ...
... or Action "Format value" ...
Field: _FILENAME
Formatstring: $cutRight(%_FILENAME%,8)']'

DD.20161231.1313.CET

Big thanks, DetlevD!

Field: _FILENAME
Formatstring: $regexp(%FILENAME%,'^(.+?[.+?)-.+?(])$','$1$2')

works fine!

How add whitespace character in your formatstring?

i have mixed files... for example:

Jay_Mexx_-Plastic(Original_Mix)_[Deep_Records-DRS245]

Jay Frog - Dream (Original Mix) [Groove Records-GR054]

etc...