mass deleting partial info in tag field

Hi guys,

I want to remove a certain part of info in the comment field on a batch of files. Examples:

7A - Coocon Recordings

I only want to remove Cocoon Recordings, so keeping 7A - .

5A/6A - Mouseville

Only want to keep 5A/6A - .

I'm not sure how to do this with actions. Any ideas?

Action: Foramt Value
Formatstring: $regexp(%comment%,(.* - ).*,$1)

or, if you want to delete " - " also (which would make sense to me):
Formatstring: $regexp(%comment%,(.) - .,$1)

I actually want to keep the " - " part so I can easily type any additional things in the comments with a clear division between that and the Key stuff (4A etc.).

I tried the first one, didn't work. Nothing changed.

The second one worked on the first example, but not on the second one.

I have no knowledge of regexp at al so can't really think how to fix that. Any ideas?


Sorry, the field actually looks like this, so with another " - " at the end:

example1: 7A - Coocon Recordings -

example2: 5A/6A - Mouseville -

Only want to keep:
7A -
5A/6A -

That's an important info. Here's your format string:
$regexp(%comment%,(.? - ).,$1)

here's your knowledge:

Thank you so much!

Was fiddling around with the string you gave earlier but couldn't get it right.

Begin Action Group Test_2011#20110202.SB1

Action #1
Actiontype 5: Format value
Formatstring: $left(%COMMENT%,$add($strstr(%COMMENT%,' - '),2))

End Action Group Test_2011#20110202.SB1 (1 Action)