10 lines
221 B
Plaintext
10 lines
221 B
Plaintext
// src/regex.ts
|
|
var isPatternNumeric = (pattern) => {
|
|
const numericPattern = /(^|\W)[0-9](\W|$)/;
|
|
return numericPattern.test(pattern) && !/[^\d\^$\[\]\(\)\*\+\-\.\|]/.test(pattern);
|
|
};
|
|
|
|
export {
|
|
isPatternNumeric
|
|
};
|