Replace multiple characters in String

Four Stars

Replace multiple characters in String

Hi All,
I have a requirement where I need to convert all characters in a string into numbers. Please refer the below example:
Eg: Lets say I have a string 'BG1002439123'. I need to parse this string and replace the characters 'BG' using the series below
A=100, B=101, C=102,.......Z=125.
So my new character string would be something like '1011061002439123'.
Is there any single function to get this done or do we need to use the StringHandling.EREPLACE() functions multiple times to achieve this functionality.
Thanks in advance.
Community Manager

Re: Replace multiple characters in String

Hi  
You can try to use tReplaceList to replace the values at a time. 
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog