Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(input) {
- input.shift()
- let barcodes = input
- let pattern = /(@#+)([A-Z][a-zA-Z0-9]{4,}[A-Z])(@#+)/g
- let diggits = /\d+/g
- let matches = []
- for (const barc of barcodes) {
- let checkBarcode = pattern.exec(barc)
- if(checkBarcode != null) {
- ?????
- } else {
- console.log(`Invalid barcode`);
- }
- }
- }
Add Comment
Please, Sign In to add comment