Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

regex only digits

console.log(`12331: ${/^d+$/.test('12331')}`) // true 
console.log(`abc: ${/^d+$/.test('abc')}`) // false 
Source by regexr.com #
 
PREVIOUS NEXT
Tagged: #regex #digits
ADD COMMENT
Topic
Name
2+3 =