On Mon, May 4, 2009 at 8:45 AM, Alex Feddor <alex.fed...@gmail.com> wrote: > Hi > > I am looking for method enables advanced text string search. Method > string.find() or re module seems no supporting what I am looking for. The > idea is as follows: > > Text ="FDA meeting was successful. New drug is approved for whole sale > distribution!" > > I would like to scan the text using AND and OR operators and gets -1 or > other value if the searching elements haven't found in the text.
There are some Python search engines that will do this. They might be overkill unless you have a lot of text to search: http://whoosh.ca/ http://lucene.apache.org/pylucene/ http://pypi.python.org/pypi/pyswish/20080920 Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor