regex int

Published on Tue Mar 01 2022

var pattern='/^[0-9][0-9]{0,6}$/'; /* int match 9 digit */ /********************************************** * * ^ starting point * 1st [0-9] number should be start between 0 to 9 * 2nd [0-9] number should be end between 0 to 9 * 3nd {0-6} number length should be exact 6 digit * $ its show the end of string or data * ************************************************/