SearchString

SearchString gives you the ability to use simple queries to search a string. Like

'Hello World'.search("hello -bye")

Searches and returns

require "rubygems"
require "SearchString"

string = 'Lorem ipsum dolor sit amet'

string.search('lorem sit')                         #=> true
string.search('lorem sit OR hello world')          #=> true
string.search('lorem sit -ignore')                 #=> true
string.search('hello world')                       #=> false
string.search('lorem -ipsum')                      #=> false
string.search('lorem ipsum OR hello world -ipsum') #=> false
string.search('lorem world OR hello world -ipsum') #=> false