title: Use LIKE/regex with variable in mongoid
body: <p>I'm trying to find all documents whose text contains the word test. The below works fine:</p>
  
  <pre><code>@tweets = Tweet.any_of({ :text =&gt; /.*test.*/ })
  </code></pre>
  
  <p>However, I want to be able to search for a user supplied string. I thought the below would work but it doesn't:</p>
  
  <pre><code>searchterm = (params[:searchlogparams][:searchterm])
  @tweets = Tweet.any_of({ :text =&gt; "/.*"+searchterm+".*/" })
  </code></pre>
  
  <p>I've tried everything I could think of, anyone know what I could do to make this work.</p>
  
  <p>Thanks in advance.</p>