title: How to match a whole word with a regular expression?
body: <p>I'm having trouble finding the correct regular expression for the scenario below:</p>
  
  <p>Lets say:</p>
  
  <pre><code>a = "this is a sample"
  </code></pre>
  
  <p>I want to match whole word - for example match <code>"hi"</code> should return False since <code>"hi"</code> is not a word and <code>"is"</code> should return True since there is no alpha character on the left and on the right side.</p>