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:
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:
But that doesn’t really help in this case.