Regex
Number
- Test number with comma decimal separator.
var str = "122,22"; var re = new RegExp("^-?(?:\d+|\d{1,3}(?:.\d{3})+)(?:\,\d+)?$", ""); var myArray = re.test(str);
var str = "122,22"; var re = new RegExp("^-?(?:\d+|\d{1,3}(?:.\d{3})+)(?:\,\d+)?$", ""); var myArray = re.test(str);