title: is there a way in R to return values with wild cards for certain characters?
body: <p>say I have something like:</p>
  
  <pre><code>df&lt;-data.frame(ID=c(1, 1, 1,2,2,2,2),
                 value=c('ABC000', 'ABC002', 'ABC003', 'ACC000', 'ABC005', 'ABC006', 'ABC007'),
                 keep=c(1, 0, 1,0,0,1,0))
  
    ID  value keep
  1  1 ABC000    1
  2  1 ABC002    0
  3  1 ABC003    1
  4  2 ACC000    0
  5  2 ABC005    0
  6  2 ABC006    1
  7  2 ABC007    0
  </code></pre>
  
  <p>and say I want to keep values where the prefix is 'ABC', I don't care what the values are in the fourth and fifth character, and then the last place has to be 0, 3 or 6. Is there a way in R to do this?</p>