how can I count the number of integers in a string using jQuery or javascript?
For example g66ghy7 = 3
The simplest solution would be to use a regular expression to replace all but the numeric values and pull out the length afterwards. Consider the following:
var s = 'g66ghy7'; alert(s.replace(/\D/g, '').length); //3