hi
consider using this...
//@ the top
using System.Text.RegularExepressions
//inside a function
RegEx regex = new RegEx("Hello");
MatchCollection mc = regex.Matches(textBox1.Text);
MessageBox.Show(mc.Count);
hope this helps...
Mohamed Galal
shaheener <[EMAIL PROTECTED]> wrote:
i wanna make a c# program that counts the no. of words in a
sentence. i used the ".Length" method but this only counts the no.
of charcters. So please if anyone got the idea to count words i'd
appreciate it if he posted it.
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Microsofts_C_Sharp/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
