update regular expresions
This commit is contained in:
parent
466dd1ae83
commit
ec40e052f6
|
@ -1,5 +1,5 @@
|
|||
function isBarcode(toFilter) {
|
||||
const exp = /^A0A3B82[A-F0-9][A-F0-9][A-F0-9][A-F0-9][A-F0-9]$/;
|
||||
const exp = /^A0A3B82[A-F0-9]{5}$/;
|
||||
return exp.test(toFilter);
|
||||
}
|
||||
let n = true;
|
||||
|
@ -9,7 +9,7 @@ function isShelving(toFilter) {
|
|||
toFilter = Array;
|
||||
toFilter[0] = s;
|
||||
}
|
||||
const exp = /^[A-Z][A-Z][A-Z]$/;
|
||||
const exp = /^[A-Z]{3}$/;
|
||||
for (let i = 0; i < toFilter.length; i++) {
|
||||
let state = exp.test(toFilter[i]);
|
||||
if (state == false)
|
||||
|
@ -20,6 +20,5 @@ function isShelving(toFilter) {
|
|||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
exports.isBarcode = isBarcode;
|
||||
exports.isShelving = isShelving;
|
||||
|
|
Reference in New Issue