You are viewing a single comment's thread. Return to all comments →
Javascript 1 liner, well, the logic is anyway.
function processData(input) { input.trim().split("\n").slice(1).forEach(str => console.log(test(str))); } function test(str) { return /^[A-Z]{5}\d{4}[A-Z]/.test(str) ? "YES" : "NO"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Valid PAN format
You are viewing a single comment's thread. Return to all comments →
Javascript 1 liner, well, the logic is anyway.