Utopian Identification Number

  • + 0 comments

    Javascript:

    const lines = input.split("\n");
    lines.shift();
    
    lines.forEach((line) => {
       const status = line.match(/^[a-z]{0,3}\d{2,8}[A-Z]{3,}$/) ? 'VALID' : 'INVALID';
       console.log(status);
    });