javatalendtmapdata-integration

How to verify if a string contains at least two numbers in Talend?


Does anybody know how to verify if a string contains at least two numbers in Talend using the Tmap component?

Example: The string "46 W Street, New York, NY 10033" is true since I have "46" and "10033"


Solution

  • In the var section : - Declare a variable called checkNumber that have type a boolean

    That have as value

    row1.YourString.matches(".*\\d.*") ? true : false