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}+$"))

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads