Using Actions to remove a new line?


#1

What do I use to represent a newline in an "Action"?

For example:

If I copy and paste the names of a band members into the comments field from a source that included separate lines for each name, how do I use an action to remove those new lines...

If that makes sense.

Thanks!


#2

Action: Format Value
Field: COMMENT
Formatstring: $regexp(%comment%,\n,; )

This replaces a linebreak with "; ". You can replace this with whatever you want in your new one line comment instead of a line break.


#3

That works, Thanks!!


#4

I am having an issue with this now.

If I apply the action and then move a through the words I notice the cursor still acts like there is something there; where the words had previously been on a new line.

For example I had a line like this:

Hard Rock
Blues Rock

I then used an action to make the line like this:

"Hard Rock" "Blues-Rock"

But when I search iTunes for "Blues-Rock" (with quotation marks) I don't get any results. Where as I do get a result if I search "Blues-Rock (with the first quotation mark), because there is an invisible extra character in between the k and " .

Is their a way to fix this??

thanks!


#5

Mp3tag linebreaks are \r\n
You should have used this
$regexp(%comment%,\r\n,; )

Might have to run this
$regexp(%comment%,\r,)
to fix it.


#6

You might want to use ...
Action: Format value
Field: COMMENT
Formatstring: $regexp(%COMMENT%,'[\r\n]+',';')

DD.20111022.0435.CEST