title: Lua frontier pattern match (whole word search)
body: <p>can someone help me with this please:</p>
  
  <pre><code>s_test = "this is a test string this is a test string "
  
  function String.Wholefind(Search_string, Word)
   _, F_result = string.gsub(Search_string, '%f[%a]'..Word..'%f[%A]',"")
   return F_result
  end
  
  A_test = String.Wholefind(s_test,"string")
  output: A_test = 2
  </code></pre>
  
  <p>So the frontier pattern finds the whole word no problem and gsub counts the whole words no problem but what if the search string has numbers?</p>
  
  <pre><code>s_test = " 123test 123test 123"
  B_test = String.Wholefind(s_test,"123test")
  output: B_test = 0 
  </code></pre>
  
  <p>seems to work with if the numbers aren't at the start or end of the search string</p>