title: Complex regex to check for two words and a quanity
body: <p>Ok what I'm trying to do is to check for the presence of </p>
  
  <ul>
  <li>"TestItem-1"</li>
  <li>a number greater then 1</li>
  <li>one of the possible words in the list of "KG. Kg, kg, Kilo(s) or Kilogram(s)"</li>
  </ul>
  
  <p>Where any of the items could be in any order and within a 6 word limit of each other.</p>
  
  <p>Has to be done in regex as there is no access to the underlying scripting engine</p>
  
  <p>This is what I've got as there a way of checking greater then I decided to use a range of 1-999 for the number check.</p>
  
  <pre><code>\b(?:[T|t]estItem-1\W+(?:\w+\W+){1,6}(^[0-9]|[1-9][0-9]|[1-9][0-9][0-9])$)\W+(?:\w+\W+){1,6}[K|k]il[o|os]|[K|k][[G|GS]|[g|gs]]|[|K|k]ilogra[m|ms]\b
  </code></pre>
  
  <p>Examples of what I need to find would be like - </p>
  
  <blockquote>
    <p>"TestItem-1 is unstable in quanties above 12 Kilograms"<br>
    "1 Kilogram of TestItem-1"</p>
  </blockquote>
  
  <p>While I wouldn't want to find -</p>
  
  <blockquote>
    <p>"15 units of TestItem-1"</p>
  </blockquote>
  
  <p>I know that what I got isn't working each section appears to work independently of each other but not together.</p>
  
  <p>I pass this over to far greater minds then mine :) </p>