Click here to Skip to main content
12,075,066 members (64,598 online)
Click here to Skip to main content

Stats

3.7K views
2 bookmarked
Posted

Don't count spaces when counting words.

, 18 Oct 2011 CPOL
The Regex method uses comma, full stop, hyphen, and apostrophe as word separators. The problem with this is that these characters are not universally used as separators. The hyphen is used to join two words. Could I suggest the following?string input = "Mr O'Brien-Smith arrived at 8.30 and...

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 18-Oct-11 16:38 Available Smitha Vijayan
1 No 18-Oct-11 16:03 Composing George Swan

License

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

Share

About the Author

George Swan
Student
Wales Wales
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160208.1 | Last Updated 18 Oct 2011
Article Copyright 2011 by George Swan
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid