Forum Discussion

Swatisree's avatar
Swatisree
New Contributor
8 years ago

Replacing Multiple Characters / Building Custom Function

Hi Everyone,
I have a requirement to perform multiple replacement such as
‘{ABCDEFGHI}JKLMNOPQR’,‘01234567890123456789’
where
A/J converts to 1,
B/K converts to 2,
{/} converts to 0 and so on.
All these have to work for one input string. Instead of writing multiple replace functions can this be done in one single function or can I write some reusable function to be used in all the pipelines in my project?

Thanks in advance!