Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
99
rated 0 times [  101] [ 2]  / answers: 1 / hits: 39036  / 13 Years ago, wed, october 5, 2011, 12:00:00

how can I count the number of integers in a string using jQuery or javascript?



For example g66ghy7 = 3


More From » jquery

 Answers
48
alert(g66ghy7.replace(/[^0-9]/g,).length);


Look here.


[#89789] Monday, October 3, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
prestonh

Total Points: 384
Total Questions: 105
Total Answers: 105

Location: England
Member since Tue, Sep 8, 2020
4 Years ago
;