title: Python text search library
body: <p>I am looking for a library that would let me do something like the following:</p>
  
  <pre><code>matches(
      user_input="hello world how are you what are you doing",
      keywords='+world -tigers "how are" -"bye bye"'
  )
  </code></pre>
  
  <p>Basically I want it to match strings based on presence of words, absence of words and sequences of words. I don't need a search engine a la Solr, because strings will not be known in advance and will only be searched once. Does such a library already exist, and if so, where would I find it? Or am I doomed to creating a regex generator?</p>