Count the number of integers in a string

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

Look here.

Leave a Comment