From: epsilonbeta AT geocities DOT com Newsgroups: comp.os.msdos.djgpp Subject: Re: Q: How to call a function like search(sentence for string1 Date: Mon, 18 May 1998 19:38:15 GMT Organization: EUnet Belgium, Leuven, Belgium Lines: 36 Message-ID: <35608241.3375682@news.ping.be> References: NNTP-Posting-Host: idialup202.antwerp.eunet.be To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi, On Fri, 15 May 1998 17:50:13 +0000, "Salvador Eduardo Tropea (SET)" wrote: >random AT NO-FREAKIN'-SPAM.visi.net (Michael Bosley) wrote: If you want a reply via e-mail, Michael, use your real e-mail address. > >> 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? > > Well an idea could be to have a look at the GNU-utility flex, with which you can easily generate C-code (using very "flex"ible regular expressions). You can find flex from the same place you got DJGPP. HTH and C ya, Edward Boone (alias Epsilon Beta) epsilonbeta AT geocities DOT com http://www.geocities.com/SiliconValley/Vista/6617/index.html MICHELLE v0.80, file-manager/shell for DJGPP /* Only nothing seems to be what it looks like */