# Using Actions to remove a new line?

**URL:** https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605
**Category:** Support
**Created:** [October 17, 2011, 6:20pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605 "2011-10-17T18:20:23Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sigrun](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@sigrun](https://community.mp3tag.de/u/sigrun)
#### Post date: [October 17, 2011, 6:20pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/1 "2011-10-17T18:20:23Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![pone](https://community.mp3tag.de/user_avatar/community.mp3tag.de/pone/32/272_2.png) [@pone](https://community.mp3tag.de/u/pone)
#### Post date: [October 17, 2011, 6:32pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/2 "2011-10-17T18:32:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![sigrun](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@sigrun](https://community.mp3tag.de/u/sigrun)
#### Post date: [October 17, 2011, 6:51pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/3 "2011-10-17T18:51:23Z")

</div>

> [@pone](#):
>
> 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.

That works, Thanks!!

---

<div class="post-metadata">

### Author: ![sigrun](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@sigrun](https://community.mp3tag.de/u/sigrun)
#### Post date: [October 21, 2011, 5:59pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/4 "2011-10-21T17:59:36Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![dano](https://community.mp3tag.de/user_avatar/community.mp3tag.de/dano/32/6_2.png) [@dano](https://community.mp3tag.de/u/dano)
#### Post date: [October 21, 2011, 7:20pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/5 "2011-10-21T19:20:32Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)
#### Post date: [October 22, 2011, 12:34am UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/6 "2011-10-22T00:34:26Z")

</div>

> [@sigrun](#):
>
> What do I use to represent a newline in an "Action"? ... how do I use an action to remove those new lines ...

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

DD.20111022.0435.CEST

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 9, 2026, 12:23pm UTC](https://community.mp3tag.de/t/using-actions-to-remove-a-new-line/12605/7 "2026-02-09T12:23:23Z")

</div>


