Help - Search - Members - Calendar
Full Version: mass deleting partial info in tag field
Mp3tag Forums > Mp3tag - International > Support
SB1
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?
pone
ZITAT(SB1 @ Feb 2 2011, 19:34) *
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
Field: COMMENT
Formatstring: $regexp(%comment%,(.* - ).*,$1)

or, if you want to delete " - " also (which would make sense to me):
Formatstring: $regexp(%comment%,(.*) - .*,$1)
SB1
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?

Edit:

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 -
pone
ZITAT(SB1 @ Feb 2 2011, 20:22) *
Edit:

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


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

EDIT:
here's your knowledge:
http://help.mp3tag.de/options_format.html#regexp
http://help.mp3tag.de/main_scripting.html
SB1
QUOTE (pone @ Feb 2 2011, 20:32) *
That's an important info. Here's your format string:
$regexp(%comment%,(.*? - ).*,$1)

Thank you so much!

Was fiddling around with the string you gave earlier but couldn't get it right.
DetlevD
QUOTE (SB1 @ Feb 2 2011, 20:22) *
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.). ...
example1: 7A - Coocon Recordings -
example2: 5A/6A - Mouseville -
Only want to keep:
7A -
5A/6A -


Begin Action Group Test_2011#20110202.SB1

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

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


DD.20110202.2107.CET
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.