cvs.gedasymbols.org/archives/browse.cgi | search |
From: | random AT NO-FREAKIN'-SPAM.visi.net (Michael Bosley) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Q: How to call a function like search(sentence for string1 AND (string2 OR string3)) |
Message-ID: | <355c8df9.92989021@news> |
Lines: | 20 |
Date: | Fri, 15 May 1998 18:53:21 GMT |
NNTP-Posting-Host: | cx582964-a.nwptn1.va.home.com |
NNTP-Posting-Date: | Fri, 15 May 1998 11:53:21 PDT |
Organization: | @Home Network |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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? What I am tending towards now is something like int result = search(char *sentence, char *search_string_and_rules); This would equate to something like: int result = search("This is a test sentence", "test AND (this OR This)") But the problem with that is parsing out all of the extraneous data... Thanks for the help Michael Bosley !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Do Not Send Me Unsolicited Email! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |