nviennot/nobrainer — pull request #22 by lodestone (2013-11-05 18:06:45+00:00)
Title: Allow Regex in :where condition

This pull request adds the ability to pass in a regex as a condition of a where, like so:

```ruby
post.comments.create(:author => 'dude', :body => 'hello')
post.comments.create(:author => 'dude', :body => 'ohai')

post.comments.where(:body => /^h/).map{|comment| comment.body } # => ["hello"]
post.comments.where(:body => /h/).map{|comment| comment.body } # => ["ohai", "hello"]
```

It's not perfect, as the implementation of RethinkDB's matching is actually expecting a string so there may be something lost in the translation of a Ruby Regex to the Regex string that RethinkDB wants. But overall I think this will be a useful addition and brings it into closer parity to Mongoid.