Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III

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.
Labels (2)
6 Replies
Anonymous
Not applicable

Hi abc12,
Please share a sample input value. Both valid and invalid
Thanks
Dwanny
_AnonymousUser
Specialist III
Author

Hi,
valid value is CKMPS5004B or BC190D9012 etc.
Invalid value is 0012343 or ABCDSDFJHK or asd34 or AS4567 etc.
_AnonymousUser
Specialist III
Author

Hi,
Waiting for your replay.
Thank you.
Anonymous
Not applicable

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
0683p000009MBb0.jpg 0683p000009MBb5.jpg
_AnonymousUser
Specialist III
Author

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.
Anonymous
Not applicable

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