Same from,to for multiple $replace in export?

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

Somehow much of my sample was omitted in my original save. Please refer to the attached file. Thank you. Mikehtml snippet.pdf (170.9 KB)

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.

Thanks ohrenkino, I appreciate the confirmation.
-Mike-