Javascript Regular Expressions Match Only Numeric Characters

Description

Javascript Regular Expressions Match Only Numeric Characters

var reg = /^\d+$/; 
reg.test("123"); // true 
reg.test("123a"); // false 
reg.test("a"); // false 



PreviousNext

Related