title: How can I match an exact word in a string with a regex?
body: <p>I've been struggling to find solution to what sounds like a simple problem.</p>
  
  <p>I need to find a word "HYD" (capital letters) in a text string. I need match to be exact. To clarify, any word/text that has "HYD" in it, but does not equal should <strong>not</strong> be matched. Exception are spaces and symbols.</p>
  
  <p><br>Find in below examples:
  <br>text1 HYD text2
  <br>text1,HYD.text2</p>
  
  <p>Ignore in below examples:
  <br>text1 HYDROtext2
  <br>text1 MYHYD text2</p>
  
  <p>The closest I was able to get was following pattern:</p>
  
  <blockquote>
    <p>objRegEx.Pattern = "[^a-z]HYD[^a-z]"</p>
  </blockquote>
  
  <p>Problem with that is that it will not find "HYD" if string starts or ends with it.</p>