title: Dropping observations in Stata based on certain characters in their label
body: <p>Is it possible in Stata to delete observations from a variable based on whether they include certain characters within their label? For example, in <code>sysuse auto</code> how can I delete all observations in <code>foreign</code> that end in "ign". The expected result here is that all observations classified as "Foreign" within the <code>foreign</code> variable would be dropped. </p>
  
  <p>I tried converting <code>foreign</code> into a string (using <code>tostring foreign, replace</code>) so I could use <code>drop if strmatch(foreign, "*ign*")==1</code> but this resulted in no observations being deleted because <code>foreign</code> has value labels, which are lost when converting to string. Any ideas?</p>