Four Stars

Problem in searching a substring within a String

Dear All, 

I have a scenario where i have to search for customer ID in the Description column of Bank.

 

I have two input files: Bank and Customer_master.

Bank description has data something like this : WP/JULY/11D2135E/Interest/Kelie where 11D2135E is the customerID.

 

I am using following method:

Bank.Description.contains(Customer_master.ACCOUNT_NUMBER)  

 

However it is giving me correct results but it is failing in some particular scenarios like.

 

Customer ID : 21AD210001, 10001

Bank DescriptionWP/AUG/SAL/21AD210001/WASA

in this case it should only match with 21AD210001 but it is also matching with 10001 which is incorrect.

 

Any idea how to overcome with this issue?

  • Data Quality