title: Javascript find index of word in string (not part of word)
body: <p>I am currently using <code>str.indexOf("word")</code> to find a word in a string.
  But the problem is that it is also returning parts of other words.</p>
  
  <p>Example: "I went to the foobar and ordered foo."
  I want the first index of the single word "foo", not not the foo within foobar.</p>
  
  <p>I can not search for "foo " because sometimes it might be followed by a full-stop or comma (any non-alphanumeric character).</p>