# How to define "return" or "enter" when replacing values

**URL:** <https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762>\
**Category:** Support\
**Created:** [October 14, 2021, 3:44pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762 "2021-10-14T15:44:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![esumsea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/esumsea/32/7219_2.png) [@esumsea](https://community.mp3tag.de/u/esumsea)\
**Post date:** [October 14, 2021, 3:44pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762/1 "2021-10-14T15:44:53Z")

</div>

Hello,

I thought I had bookmarked a page that explained how to write scripts and what each scripting character did what, when writing a string. It is eluding me now, so if one can post a link I would appreciate it.

Basically what I am trying to do is to replace the value created by when one hits the "Enter" or "Return" key and replace it with a ". " (Period & Space). I know how to write the action I just don't know how to define the Enter or Return Key value.

Thanks in advance! 😀

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [October 14, 2021, 4:29pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762/2 "2021-10-14T16:29:29Z")

</div>

Perhaps the help helps:

> **[Replace with Regular Expression – Mp3tag Documentation](https://docs.mp3tag.de/actions/replace-regexp/)**
>
> Documentation on the Replace with Regular Expression action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

you are probably looking for `\r\n`  
This is for an action of the type "Replace with regular expression".  
I don't know right now whether it can also be done with a plain replace as I think that that function takes every character literally. So replacing $char(13) $char(10) with dot and space will not lead to hits.

---

<div class="post-metadata">

**Author:** ![esumsea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/esumsea/32/7219_2.png) [@esumsea](https://community.mp3tag.de/u/esumsea)\
**Post date:** [October 14, 2021, 4:43pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762/3 "2021-10-14T16:43:09Z")

</div>

YES!!!! That is the page! Thank you so much, once again, my friend! 👏

I will experiment and report back.

---

<div class="post-metadata">

**Author:** ![esumsea](https://community.mp3tag.de/user_avatar/community.mp3tag.de/esumsea/32/7219_2.png) [@esumsea](https://community.mp3tag.de/u/esumsea)\
**Post date:** [October 14, 2021, 7:54pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762/4 "2021-10-14T19:54:46Z")

</div>

OK, I am using a simple replace action. I tried using \r and \n and that did not work. I also tried $char(10) and $char(8) to no avail, as you suspected.

So I switched to replace with regular expression. I put in a seperate line for \r and another for \n. This worked but it seems that Return and New Line were somehow duplicating each other as I would get ". . " for every return. So I removed the line with \n and that did the trick.

So, for another that may be reading this:  
Replace with regular expression: "\r"  
Replace with ". "  
(Do not include quotes when writing action, they are just used here to clarify what you must input.) Thanks again, ohrenkino!

---

<div class="post-metadata">

**Author:** ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)\
**Post date:** [October 14, 2021, 7:59pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762/5 "2021-10-14T19:59:18Z")

</div>

I think the expression should look something like this for the field in question:  
Search string: `\r\n`  
Replace with: .  
(which is dot blank)  
I think that in the WIndows world every (text) line is terminated by "carriage return" (=\r) and "line feed" (=\n) - a relict from the old line printer world.

---

<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:** [November 13, 2021, 7:59pm UTC](https://community.mp3tag.de/t/how-to-define-return-or-enter-when-replacing-values/54762/6 "2021-11-13T19:59:53Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
