Mail Archives: djgpp/1998/05/15/16:42:13
random AT NO-FREAKIN'-SPAM.visi.net (Michael Bosley) wrote:
> Hi all,
>
> I am writing a search function to find substrings in sentences using
> AND and OR logic and I would like to know if there is any way to do
> something like:
>
> int result = search("This is a test sentence" for "test" AND ("this"
> OR "This"));
>
> Any ideas?
Just an idea: Perhaps you can use regular expressions. If the user is the one
that type the text is a little harder because you must convert the "or"/"and"
stuff to the regex syntax.
Advantages: You can do much more powerfull searchs.
Disadvantage: Is sloooowwww, well that depends on the reference, but is 10
times slower than a simple search.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -