Hi! On Mon, Feb 19, 2007 at 10:44:07AM -0800, Sonia Lyris wrote: > What is the best way to search a (possibly long) string of free-form > text (like, say, an email) for occurrances of some set of key phrases > of interest? Fuzzy or not; I'll take what I can get.
could you be a little bit more specific in what you want to do? For finding out if a phrase occurs in a single piece of text a regex could be sufficient, but I doubt that's what you're asking for :-) of course you can do this with ferret, too: require 'rubygems' require 'ferret' index = Ferret::I.new index << 'your text here' top_docs = index.search 'text' puts 'found text' if top_docs.total_hits > 0 Jens -- Jens Krämer webit! Gesellschaft für neue Medien mbH Schnorrstraße 76 | 01069 Dresden Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [EMAIL PROTECTED] | www.webit.de Amtsgericht Dresden | HRB 15422 GF Sven Haubold, Hagen Malessa _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

