Using multiple strings with replaceFrom/replaceTo functions.
For the filename template syntax, is it possible to use multiple times or strings in the replaceTo function?
For instance, using something like this
replaceFrom="['f', 'a', 'e']" replaceTo="['3', '4', '5']"
replaces either letter by the whole string after "replaceTo"!!! (e.g., the word "falsehood" would be changed to "['3', '4', '5']['3', '4', '5']ls['3', '4', '5']hood"; while "34ls5hood" is what I'd expect).
Seems that the replaceFrom function supports multiple strings, but the replaceTo do not (not with the same syntax, at least). Also, simply trying to use multiple times these functions, each with a different string, is not supported (in that case, the filename only considers the latest replaceFrom/replaceTo pair in the syntax).
For instance, using something like this
replaceFrom="['f', 'a', 'e']" replaceTo="['3', '4', '5']"
replaces either letter by the whole string after "replaceTo"!!! (e.g., the word "falsehood" would be changed to "['3', '4', '5']['3', '4', '5']ls['3', '4', '5']hood"; while "34ls5hood" is what I'd expect).
Seems that the replaceFrom function supports multiple strings, but the replaceTo do not (not with the same syntax, at least). Also, simply trying to use multiple times these functions, each with a different string, is not supported (in that case, the filename only considers the latest replaceFrom/replaceTo pair in the syntax).
replaceFrom
uses regular expressions to perform the replacement. Therefore,"['f', 'a', 'e']"
means match a single character present in the list below, and that matched value is being replaced with the value provided asreplaceTo
. That's the behavior you observe. Currently, there is no functionality to provide an array or to perform multiple replacements, but we're considering various options for implementing this in the future.