Filtering numeric values and alpha-numeric values in a string

Highlighted
One Star

Filtering numeric values and alpha-numeric values in a string

Hello,
I have a MSSQL String column having values like "000123", "ABC123", "00-123", etc.
I want to INSERT into a MySQL table only the Numeric values like "000123" because the target datatype is INT.
The rejected values i.e. the values which are alpha-numeric or having any special characters should be sent to a CSV file.
Can you tell me the component to be used or the process to filter just the String having numeric values ?
One Star

Re: Filtering numeric values and alpha-numeric values in a string

Try with regex such as 
string.matches("^\\p{Digit}+$"))

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch