title: \b Regex include period as word
body: <p>I am trying to get a regular expression to return instances of a specific word, and that word only. The word as a substring of another word should not be included for example.</p>
  
  <p>Here is my regex expression in Python 3.x so far. </p>
  
  <p><code>re.search(r'\bJohnn(y\'s|y)[.]?\b', string)</code></p>
  
  <p>However, since <code>.</code> is not considered a word character by <code>\w</code> then instances string included <code>.Johnny</code> are matched when I do not want them to be.</p>
  
  <p>To clarify, period after the string is OK.</p>
  
  <p>Is there anyway for me to include <code>.</code> as a part of the <code>\w</code> list?</p>