How to use $replace?

Hello, I've been reading scripting functions and would find handy the function $replace, but I don't understand how does that work.

What I basically want to achieve: I have a long string in Composer tag (multiple values) and I made a typo in every value (e.g. I want to correct Johny to Johnny) and want to keep every other value (e.g. Bob;Johny -> Bob;Johnny).

Should I use $replace? And if so, how?

The scripting function has its merrits if you have a list of string pairs in the same field.
In your case:
$replace(%composer%,Johny,Johnny)
$replace() replaces only the match with the new string, so the rest of the string is left alone anyway.
If you have just single pair, then an action of the type "Replace" would be quite enough.

You use scripting functions in all features that ask for a format string.

1 Like

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