Count integers , small letters in javascript
How to count no of integers , small letters in text using javascript
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
SenthilkumarRank #387 · 6.5K reputationPosted Mar 31, 2012, 3:32 AM EDT
Just i designed a sample page to test this.
Place these two controls in your page:
Place this javascript function in your header:
Output:
If it is helpful then mark it as "Accepted Answer"
Mayur GujrathiRank #666 · 3.6K reputationPosted Mar 31, 2012, 3:40 AM EDT
Mayur GujrathiRank #666 · 3.6K reputationPosted Mar 31, 2012, 4:08 AM EDT
SenthilkumarRank #387 · 6.5K reputationPosted Mar 31, 2012, 6:01 AM EDT
Try this...
var totalSpecChars = content.replace(/[^!""£$%^&*())]/g,"").length;