title: Rails 3 - Check if string/text includes a certain word/character via regex in controller
body: <p>I am working on a quoting mechanism in my app, where it should be possible to simply type #26, for example, in the comment form in order to quote comment 26 of that topic.<br>
  To check if a user wants to quote one or more comments in the first place, I put an if condition after my current_user.comments.build and before @comment.save.<br>
  But, just to make my question a bit more general and easier to adapt:  </p>
  
  <pre><code>if @comment.content.include?(/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i)
  </code></pre>
  
  <p>I want something like this. That example was for checking if the comment's content includes emails. But logically I get an "can't convert regexp to string" error.  </p>
  
  <p>How can you do the include? method in rails with an regexp? So, to check whether a text includes a string of a certain regex format?</p>
  
  <p>Or is the controller the wrong place for such regex actions?</p>