PAN Card number validation

One Star

PAN Card number validation

Hi,
I want to do PAN Card number validation ? This should be 10 characters in size and should have atleast 1 character and 1 number. My input file is Details.xls and output will be two file ,validePancard.xls containting valid no and other is invalid.xls file having invalid no.
Will you please suggest me which component should i use and how to do that?
Thank you in advance.
One Star

Re: PAN Card number validation

Hi abc12,
Please share a sample input value. Both valid and invalid
Thanks
Dwanny
One Star

Re: PAN Card number validation

Hi,
valid value is CKMPS5004B or BC190D9012 etc.
Invalid value is 0012343 or ABCDSDFJHK or asd34 or AS4567 etc.
One Star

Re: PAN Card number validation

Hi,
Waiting for your replay.
Thank you.
One Star

Re: PAN Card number validation

Hi abc12,
Please find attached the Talend job for your requirement. The regular expression checks the following:
* Total number of characters is exactly 10
* Contains atleast a digit
* Contains atleast one character
* Contains only alphabets or digits.
Thanks
Dwanny
One Star

Re: PAN Card number validation

Hi,
I am not able to understand the code part of image(it's not visible).will you please write down the code line here
i.e java.util.regx.Pattern.compile.....etc.
Thank you for your valuable response.
One Star

Re: PAN Card number validation

Hi,
java.util.regex.Pattern.compile("^(?=.*\\d)(?=.*){10}$").matcher(input_row.PANNumber).find()
Here instead of PANNumber specify your column name.
Thanks,
Dwanny