Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!proto!joe From: joe@proto.com (Joe Huffman) Newsgroups: comp.os.msdos.programmer Subject: Re: pattern matching Message-ID: <1991May07.154956.13646@proto.com> Date: 7 May 91 15:49:56 GMT References: <1991May6.160733.10509@umbc3.umbc.edu> Distribution: usa Organization: Prototronics @ Sandpoint, Idaho Lines: 15 cs106132@umbc5.umbc.edu (cs106132) writes: >does anyone have a fast pattern matching algo? I am using good old slide one >over routine, but it is so SLOW. Any help will be appreciated. Assuming that you mean an exact match and also assuming you aren't writing in 'C' or 'C++' where you would have 'strstr()' available... Try looking in Robert Sedgewick's book "Algorithms". I implemented the Zortech library's strstr() from this book (with some tweaks for more speed) and it compared quite favorably to several other versions of strstr() that I had obtained for comparision. -- joe@proto.com