# Same from,to for multiple $replace in export?

**URL:** <https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783>\
**Category:** Support\
**Created:** [February 12, 2018, 9:48pm UTC](https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783 "2018-02-12T21:48:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mls](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mls/32/4841_2.png) [@mls](https://community.mp3tag.de/u/mls)\
**Post date:** [February 12, 2018, 9:48pm UTC](https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783/1 "2018-02-12T21:48:42Z")

</div>

Hello,

Is there any way that the “from1,to1,from2,to2,fromx,tox” string can be entered once and used in multiple $replace functions in Export?

In order to export well formed HTML code, code that can pass HTML validation, I have several large $replace functions scattered within a single .mte file. Many of these $replace functions contain identical “from,to” information.

In the following excerpt from an .mte, the identical edit mask is used twice in the same HTML statement:

_ **Please see attached file for example** _

Needing to repeat identical information several times within the .mte makes it more cumbersome to maintain and much easier to make mistakes.

Is there a better way of doing this that I haven’t discovered?

I had thought it might be possible to $puts the edit mask into a variable and then format the $replace somethiing like:  
$puts(editmask,' ,,/,,;,,:,,á,A,ü,U,ó,O,é,E,&,-,?,-,!,-')  
$replace(%albumartist%,$get(editmask))  
But this syntax for the replace doesn’t seem to be viable and no value is returned from the $replace.

I did find another forum entry where $replace/$get was used like this:  
$replace($get(my\_NUMENTITY),&,&)  
But that doesn’t really help in this case.

Any suggestions?

Thanks,

Mike

---

<div class="post-metadata">

**Author:** ![mls](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mls/32/4841_2.png) [@mls](https://community.mp3tag.de/u/mls)\
**Post date:** [February 12, 2018, 9:56pm UTC](https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783/2 "2018-02-12T21:56:25Z")

</div>

Somehow much of my sample was omitted in my original save. Please refer to the attached file. Thank you. Mike[html snippet.pdf](https://community.mp3tag.de/uploads/default/original/2X/5/5de722dc79a5b29ddfd7216ee591fafc93e99053.pdf) (170.9 KB)

---

<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:** [February 13, 2018, 6:28am UTC](https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783/3 "2018-02-13T06:28:01Z")

</div>

> [@mls](#):
>
> I did find another forum entry where $replace/$get was used like this:
> 
> $replace($get(my\_NUMENTITY),&,&)
> 
> But that doesn’t really help in this case.

The example that you quoted inserts a string there where the function expects a string. As you have found the $replace() does not allow variables in the replace-pairs-part. Currently.

---

<div class="post-metadata">

**Author:** ![mls](https://community.mp3tag.de/user_avatar/community.mp3tag.de/mls/32/4841_2.png) [@mls](https://community.mp3tag.de/u/mls)\
**Post date:** [February 13, 2018, 2:53pm UTC](https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783/4 "2018-02-13T14:53:28Z")

</div>

Thanks ohrenkino, I appreciate the confirmation.  
-Mike-

---

<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:27pm UTC](https://community.mp3tag.de/t/same-from-to-for-multiple-replace-in-export/40783/5 "2026-02-09T12:27:14Z")

</div>


