title: Exact pattern match using perl index() function
body: <p>I am trying to use the index() function and I want to find the position of a word inside a string, only when it is an exact match. For example:</p>
  
  <p>My string is <code>STRING="CATALOG SCATTER CAT CATHARSIS"</code></p>
  
  <p>And my search string is <code>KEY=CAT</code></p>
  
  <p>I want to say something like <code>index($STRING, $KEY)</code> and check match for CAT, and not CATALOG. How do I accomplish this? The documentation says </p>
  
  <blockquote>
  The index function searches for one string within another, but without the wildcard-like behavior of a full regular-expression pattern match.
  </blockquote> 
  
  <p>which makes me think that it may not be that straight-forward, but my perl skills are limited :). Is it possible to do what I am trying to do?</p>
  
  <p>Hopefully, I was able to articulate my question well. Thanks in advance for your help!</p>