Answers for "regex only digits"

0

regex only digits

console.log(`12331: ${/^\d+$/.test('12331')}`) // true 
console.log(`abc: ${/^\d+$/.test('abc')}`) // false
Posted by: Guest on August-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language