javscript number only regex code example
Example: number pattern js
/^[\+\-]?\d*\.?\d+(?:[Ee][\+\-]?\d+)?$/
/*
matched values:
-2.14e10
+14E-20
42.69
*/
/^[\+\-]?\d*\.?\d+(?:[Ee][\+\-]?\d+)?$/
/*
matched values:
-2.14e10
+14E-20
42.69
*/