title: Searching R corpus for all words ending in "esque"
body: <p>I am using R's <code>tm</code> package to get word frequencies using the dictionary method. I want to find all words that end with "esque" whether they are spelled "abcd-esque", "abcdesque" or "abcd esque" (since all different spellings exist in my corpus). How can I create a regular expression for this? This is what I have so far. Any help/tips would be greatly appreciated.</p>
  
  <pre><code>text &lt;- Corpus(DirSource("txt/"))
  text &lt;- tm_map(text,tolower) 
  text &lt;- tm_map(text,stripWhitespace) 
  dtm.text &lt;- DocumentTermMatrix(text)
  list&lt;-inspect(
      DocumentTermMatrix(text,list(dictionary = c("rose", "green", "esque")))
  )
  </code></pre>