Reading from a text file with unknown formatting : <p>I am trying to read from a text file. this text file does not have a specific pattern but is a paragraph of a story. I am trying to get each individual word and track their number of occurrences.</p>

<p>For example, this is a exerpt from the text file to give an idea of the formatting.</p>

<blockquote>
  <p>In submitting the following record we are conscious of the fact that we have errors. Some of them have been found and 
  corrected by pen even after the stencil had been out. Others, I presume will be found by you. Others will not be 
  found, there are none among us today who have lived long enough in the past to know them. It is our sincere desire 
  to make this record as accurate as possible. To do this we must have your help. If you fin a mistake kindly notify 
  this writer who will in turn correct his copy. It is our intention to rewrite this story, making it more readable by 
  including such personal human interest stories as are available; more accurate by correcting the mistakes which you 
  may find. The first three pages are taken directly without any changes form the family record as written by cousin 
  Ethel Mards Carr Marsh.  We are deeply indebted to here for this information. Without her help it would have been 
  impossible to have gone back beyond the parents of Daniel and David. As stated in the history, four Marsh brothers 
  came to the colonies some time prior to 1761. How many years before this date it was, we do not know. Samuel Marsh, 
  Son of Zebediah Marsh, was born in 1761. We may well imagine that it was several years before his birth. We have 
  studied the records of England of their period.  They were perilous years. Many came to America to escape the wrath 
  of a tyrant Marsh King, others to escape the judgement of the Puritan Cromwell.</p>
</blockquote>

<p>I know how to read from a file that is of a specific formatting but I am not sure how I am going to read this file to find every individual word without any punctuation.</p>

<p>I am guessing i am going to use a fscanf with a regex to do this but I am not 100% sure how to implement this.</p>
