Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex for exactly n digits

const isExactly5Digits = /d{5}/g.test(someString);

const isAtLeast5Digits = /(|)|d{5}/.test(someString);
 
PREVIOUS NEXT
Tagged: #regex #digits
ADD COMMENT
Topic
Name
5+4 =