Click here to Skip to main content
15,896,201 members
Articles / General Programming / Regular Expressions

Don't count spaces when counting words.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
25 Oct 2011CPOL 8.1K   1  
I also use a Regex expression to count words, which returns the same number of words as MS Word. I wrap the Regular Expression in a String extension method to make it easy to use.public static class StringExtensions{ /// /// WordCounts Regular Expression /// ...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
France France
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions