I have a large text file I am reading from and I need to find out how many times some words come up. For example, the word the. I\'m doing this line by line e
I think this is an area where unit tests can really help. I had a similar thing some time ago where I wanted to break a string up in a number of complex ways and create a number of tests, each of which tested against a different source string, helped me to isolate the regex and also quickly see when I got it wrong.
Certainly if you gave us an example of a test string and the result it would help us to give you better answers.