title: Removing number strings using Regex
body: <p>I am trying to delete all numbers from a string as long as the number ends in " ","grams","g","kg" or "kilograms".</p>
  
  <p>I am using a regular expression but its not removing any numbers. <strong>Whats going wrong?</strong></p>
  
  <p>For example;  the string <code>"abc 1231g kjsjk jkdsfkjdkj 11kg"</code> is should produce <code>"abc  kjsjk jkdsfkjdkj  "</code></p>
  
  <p>Python code:</p>
  
  <pre><code>from re import sub
  test = "abc 1231g kjsjk jkdsfkjdkj 11kg"
  test = sub("[\d]+[\sg|$grams|$kg|$kilograms]$"," ",test)
  print test # every number is still there
  </code></pre>