title: Regular expression to test exact word with a trailing dot
body: <p>I am having a dynamic variable which I need to match against a source.</p>
  
  <pre><code>Source: 'text clientLogin padding float';
  search: '.clientLog'
  </code></pre>
  
  <p>The search text has a leading dot('.') which should be omitted while comparing.</p>
  
  <p>For the above example I should:</p>
  
  <ol>
  <li>Get the part of search after '.'(dot)</li>
  <li>Check the source for the search text i.e <code>clientLog</code> &amp; return true if whole word matches.(in this example it should return false as source has  <code>clientLogin</code>).</li>
  </ol>
  
  <p>I am trying to use RegEx to achieve this</p>
  
  <pre><code>var regEx = new RegExp(k); // k is the search text
   if(regEx.test(classNames)){....
  </code></pre>
  
  <p>Above code is inside jQuery.each,k is the key of the object which is being iterated.I did not figure out how to omit the '.' but read somewhere to implement <strong>Word Boundries</strong> for the exact match.</p>
  
  <p>Please suggest.</p>
  
  <p>thanks</p>