Regex untuk tepat n digit
const isExactly5Digits = /\b\d{5}\b/g.test(someString);
const isAtLeast5Digits = /\(|\)|\d{5}/.test(someString);
Anxious Alligator
const isExactly5Digits = /\b\d{5}\b/g.test(someString);
const isAtLeast5Digits = /\(|\)|\d{5}/.test(someString);