Remove part of Tag


Having searched the forums I thought I’d worked this out – didn’t, haven't – messed up.

Have title tag for example
“Happy Birthday, Sweet Sixteen - Neil Sedaka”
Want to remove “ - Neil Sedaka”

Created action
Field = Title
Regular Expression = (.)-(.)
Replace matches with = $trim($1)

Using this action title is renamed
“Happy Birthday”

Seems to work OK if there is no “, “ in title
i.e. “Happy Birthday Sweet Sixteen - Neil Sedaka”
Returns “Happy Birthday Sweet Sixteen”

Need to be shown the error of my ways – big please


There's currently a problem when a comma enters a function in the RegEx Action.

But you can just use a different expression that has the same effect, like
RE: \s+-.+$


Thanks for that.

Luckily didn't mess up too many. This should mean that I don't mess up any more.



Man, I am really trying to understand this. I am trying to trim the last 7 characters from my album field. I have been using a regular expression to trim the first three characters of the title like so:

Field = Title
Regular Expression = ^.{3}
Replace matches with = ""

Very simple and straight forward. I thought that it would be just as simple to do the last 7 (not trailing spaces " [YYYY]" with $.{7} . This obviously is not working. I am not good at scripting, I have been reding the forum for about an hours and I am just not getting it.

Thanks in advance.


You could have seen from my post that the end sign $ is also acutally put at the end!


Damn I hate it when it is something simple like that. Thanks for the help.