can any one tell us. how we can count numbers in string list;
the list like this.
list
"27."
"32."
"uzma"
"khan."
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
Vladimir Nani29 reputationPosted Apr 16, 2010, 11:56 PM EDT
int count = 0;
foreach ( string s in ms_word_doc )
{
count += Regex.Matches(s, @"\d+").Count;
}
Console.WriteLine(count);
before include System.Text.RegularExpressions;
If You Like My Answer Please Click On Accept It